From 1882c56ca049d74dfde3f5b29533a480d2b78d17 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Thu, 29 Apr 2021 11:09:28 -0700 Subject: [PATCH] Bump `hmac` and `crypto-mac` crate deps to v0.11 --- Cargo.lock | 14 +++++++------- bcrypt-pbkdf/Cargo.toml | 2 +- pbkdf2/Cargo.toml | 6 +++--- pbkdf2/src/lib.rs | 4 ++-- scrypt/Cargo.toml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 93b416d7..bef94c4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,7 +29,7 @@ name = "bcrypt-pbkdf" version = "0.5.0" dependencies = [ "blowfish", - "crypto-mac 0.10.0", + "crypto-mac 0.11.0", "pbkdf2", "sha2", "zeroize", @@ -150,9 +150,9 @@ dependencies = [ [[package]] name = "crypto-mac" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array", "subtle", @@ -211,11 +211,11 @@ checksum = "5af1f635ef1bc545d78392b136bfe1c9809e029023c84a3638a864a10b8819c8" [[package]] name = "hmac" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.10.0", + "crypto-mac 0.11.0", "digest", ] @@ -271,7 +271,7 @@ name = "pbkdf2" version = "0.7.5" dependencies = [ "base64ct", - "crypto-mac 0.10.0", + "crypto-mac 0.11.0", "hex-literal", "hmac", "password-hash", diff --git a/bcrypt-pbkdf/Cargo.toml b/bcrypt-pbkdf/Cargo.toml index a75a30cc..e87407f2 100644 --- a/bcrypt-pbkdf/Cargo.toml +++ b/bcrypt-pbkdf/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" [dependencies] blowfish = { version = "0.7", features = ["bcrypt"] } -crypto-mac = "0.10" +crypto-mac = "0.11" pbkdf2 = { version = "0.7", default-features = false, path = "../pbkdf2" } sha2 = { version = "0.9", default-features = false } zeroize = { version = "1", default-features = false } diff --git a/pbkdf2/Cargo.toml b/pbkdf2/Cargo.toml index c50de447..07e7a123 100644 --- a/pbkdf2/Cargo.toml +++ b/pbkdf2/Cargo.toml @@ -12,18 +12,18 @@ edition = "2018" readme = "README.md" [dependencies] -crypto-mac = "0.10" +crypto-mac = "0.11" rayon = { version = "1", optional = true } base64ct = { version = "1", default-features = false, optional = true } -hmac = { version = "0.10", default-features = false, optional = true } +hmac = { version = "0.11", default-features = false, optional = true } password-hash = { version = "0.2", default-features = false, optional = true, features = ["rand_core"] } sha1 = { version = "0.9", package = "sha-1", default-features = false, optional = true } sha2 = { version = "0.9", default-features = false, optional = true } [dev-dependencies] hex-literal = "0.3" -hmac = "0.10" +hmac = "0.11" rand_core = { version = "0.6", features = ["std"] } sha1 = { version = "0.9", package = "sha-1" } sha2 = "0.9" diff --git a/pbkdf2/src/lib.rs b/pbkdf2/src/lib.rs index 7f12d262..b1d558cb 100644 --- a/pbkdf2/src/lib.rs +++ b/pbkdf2/src/lib.rs @@ -115,7 +115,7 @@ where F: Mac + NewMac + Clone + Sync, { let n = F::OutputSize::to_usize(); - let prf = F::new_varkey(password).expect("HMAC accepts all key sizes"); + let prf = F::new_from_slice(password).expect("HMAC accepts all key sizes"); res.par_chunks_mut(n).enumerate().for_each(|(i, chunk)| { pbkdf2_body(i as u32, chunk, &prf, salt, rounds); @@ -130,7 +130,7 @@ where F: Mac + NewMac + Clone + Sync, { let n = F::OutputSize::to_usize(); - let prf = F::new_varkey(password).expect("HMAC accepts all key sizes"); + let prf = F::new_from_slice(password).expect("HMAC accepts all key sizes"); for (i, chunk) in res.chunks_mut(n).enumerate() { pbkdf2_body(i as u32, chunk, &prf, salt, rounds); diff --git a/scrypt/Cargo.toml b/scrypt/Cargo.toml index 8a22a5c5..fadf53b3 100644 --- a/scrypt/Cargo.toml +++ b/scrypt/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" [dependencies] base64ct = { version = "1", default-features = false, features = ["alloc"], optional = true } -hmac = "0.10" +hmac = "0.11" password-hash = { version = "0.2", default-features = false, features = ["rand_core"], optional = true } pbkdf2 = { version = "0.7", default-features = false, path = "../pbkdf2" } salsa20 = { version = "0.7", default-features = false, features = ["expose-core"] }