mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add an implementation for new_with_strategy() on sha512trunc256
this is needed to unbreak hosted mode. The strategy in hosted mode is *always* to use software as there is no hardware hashing engine.
This commit is contained in:
parent
6e65cbda2e
commit
933666a67b
1 changed files with 8 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
//! SHA-512
|
||||
use crate::consts::{H384, H512, H512_TRUNC_224, H512_TRUNC_256, STATE_LEN};
|
||||
use crate::FallbackStrategy;
|
||||
use block_buffer::BlockBuffer;
|
||||
use core::slice::from_ref;
|
||||
use digest::consts::{U128, U28, U32, U48, U64};
|
||||
|
|
@ -136,7 +137,13 @@ impl Reset for Sha384 {
|
|||
pub struct Sha512Trunc256 {
|
||||
engine: Engine512,
|
||||
}
|
||||
|
||||
impl Sha512Trunc256 {
|
||||
pub fn new_with_strategy(_strat: FallbackStrategy) -> Self {
|
||||
Sha512Trunc256 {
|
||||
engine: Engine512::new(&H512_TRUNC_256),
|
||||
}
|
||||
}
|
||||
}
|
||||
impl Default for Sha512Trunc256 {
|
||||
fn default() -> Self {
|
||||
Sha512Trunc256 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue