From 370288dffa03cbb1a8c583e4a96e2aad614e46a4 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 31 Jan 2024 04:05:03 +0800 Subject: [PATCH] ...right, wrong hash type. no acceleration option available. --- services/gam/src/bip39.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/gam/src/bip39.rs b/services/gam/src/bip39.rs index d19b3ed88..b8c55d008 100644 --- a/services/gam/src/bip39.rs +++ b/services/gam/src/bip39.rs @@ -31,7 +31,7 @@ pub(crate) fn bytes_to_bip39(bytes: &Vec) -> Result, Bip39Error> 16 | 20 | 24 | 28 | 32 => (), _ => return Err(Bip39Error::InvalidLength), } - let mut hasher = sha2::Sha256Sw::new(); + let mut hasher = sha2::Sha256::new(); hasher.update(bytes); let digest = hasher.finalize(); let checksum_bits = bytes.len() / 4; @@ -112,7 +112,7 @@ pub(crate) fn bip39_to_bytes(bip39: &Vec) -> Result, Bip39Error> bucket as u8 }; - let mut hasher = sha2::Sha256Sw::new(); + let mut hasher = sha2::Sha256::new(); hasher.update(&data); let digest = hasher.finalize(); let checksum_bits = data.len() / 4;