diff --git a/Cargo.toml b/Cargo.toml index 04a8f17..eebee30 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,13 +48,13 @@ serde = { version = "1.0", default-features = false, features = [ "alloc" ], opt zeroize = { version = "1.5", features = ["zeroize_derive"], optional = true } # Unexported dependnecies -bitcoin_hashes = { version = "0.11.0", default-features = false } +bitcoin_hashes = { version = ">=0.12, <=0.13", default-features = false } unicode-normalization = { version = "=0.1.22", optional = true } [dev-dependencies] # Enabling the "rand" feature by default to run the benches bip39 = { path = ".", features = ["rand"] } -bitcoin_hashes = "0.11.0" # enable default features for test +bitcoin_hashes = ">=0.12,<=0.13" # enable default features for test [package.metadata.docs.rs] diff --git a/src/pbkdf2.rs b/src/pbkdf2.rs index e7d3375..326ca55 100644 --- a/src/pbkdf2.rs +++ b/src/pbkdf2.rs @@ -112,7 +112,7 @@ pub(crate) fn pbkdf2(mnemonic: M, unprefixed_salt: &[u8], c: usize, res: &mut prfc.input(unprefixed_salt); prfc.input(&u32_to_array_be((i + 1) as u32)); - let salt = hmac::Hmac::from_engine(prfc).into_inner(); + let salt = hmac::Hmac::from_engine(prfc).to_byte_array(); xor(chunk, &salt); salt }; @@ -120,7 +120,7 @@ pub(crate) fn pbkdf2(mnemonic: M, unprefixed_salt: &[u8], c: usize, res: &mut for _ in 1..c { let mut prfc = prf.clone(); prfc.input(&salt); - salt = hmac::Hmac::from_engine(prfc).into_inner(); + salt = hmac::Hmac::from_engine(prfc).to_byte_array(); xor(chunk, &salt); }