mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
...right, wrong hash type. no acceleration option available.
This commit is contained in:
parent
ee95bc1306
commit
370288dffa
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ pub(crate) fn bytes_to_bip39(bytes: &Vec<u8>) -> Result<Vec<String>, Bip39Error>
|
||||||
16 | 20 | 24 | 28 | 32 => (),
|
16 | 20 | 24 | 28 | 32 => (),
|
||||||
_ => return Err(Bip39Error::InvalidLength),
|
_ => return Err(Bip39Error::InvalidLength),
|
||||||
}
|
}
|
||||||
let mut hasher = sha2::Sha256Sw::new();
|
let mut hasher = sha2::Sha256::new();
|
||||||
hasher.update(bytes);
|
hasher.update(bytes);
|
||||||
let digest = hasher.finalize();
|
let digest = hasher.finalize();
|
||||||
let checksum_bits = bytes.len() / 4;
|
let checksum_bits = bytes.len() / 4;
|
||||||
|
|
@ -112,7 +112,7 @@ pub(crate) fn bip39_to_bytes(bip39: &Vec<String>) -> Result<Vec<u8>, Bip39Error>
|
||||||
bucket as u8
|
bucket as u8
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut hasher = sha2::Sha256Sw::new();
|
let mut hasher = sha2::Sha256::new();
|
||||||
hasher.update(&data);
|
hasher.update(&data);
|
||||||
let digest = hasher.finalize();
|
let digest = hasher.finalize();
|
||||||
let checksum_bits = data.len() / 4;
|
let checksum_bits = data.len() / 4;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue