Skip to content

Commit

Permalink
Merge pull request #60 from kayabaNerve/master
Browse files Browse the repository at this point in the history
bitcoin_hashes >= 0.12, <= 0.13
  • Loading branch information
stevenroose authored Jan 29, 2024
2 parents b11619d + 256a00e commit 37915dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions src/pbkdf2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ pub(crate) fn pbkdf2<M>(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
};

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);
}
Expand Down

0 comments on commit 37915dc

Please sign in to comment.