diff --git a/Cargo.lock b/Cargo.lock index e39adea..448d602 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -39,7 +39,7 @@ checksum = "d9aa1eef3994e2ccd304a78fe3fea4a73e5792007f85f09b79bb82143ca5f82b" [[package]] name = "belt-hash" version = "0.2.0-pre.5" -source = "git+https://github.com/RustCrypto/hashes.git#7d44caf065dbeb3f10a372a26a8b9f1c927f8433" +source = "git+https://github.com/RustCrypto/hashes.git#d9ad085ed12dba58d2a6d75d76a17a1b2706c4c7" dependencies = [ "belt-block", "digest", @@ -69,7 +69,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cipher" version = "0.5.0-pre.8" -source = "git+https://github.com/RustCrypto/traits.git#915474f1ed5be0a19fd102d5f75ef8e04c765416" +source = "git+https://github.com/RustCrypto/traits.git#1cae37d25c5bc6c59570d5136ccb710e1914b07a" dependencies = [ "crypto-common", "inout", @@ -78,7 +78,7 @@ dependencies = [ [[package]] name = "cmac" version = "0.8.0-pre.3" -source = "git+https://github.com/RustCrypto/MACs.git#64d671d5c375838173d18e30bc14dffc80c13e51" +source = "git+https://github.com/RustCrypto/MACs.git#55327cab3a3aea0cfb3b7fafde6649bbd425beb7" dependencies = [ "cipher", "dbl", @@ -106,7 +106,7 @@ dependencies = [ [[package]] name = "crypto-common" version = "0.2.0-rc.2" -source = "git+https://github.com/RustCrypto/traits.git#915474f1ed5be0a19fd102d5f75ef8e04c765416" +source = "git+https://github.com/RustCrypto/traits.git#1cae37d25c5bc6c59570d5136ccb710e1914b07a" dependencies = [ "hybrid-array", ] @@ -123,7 +123,7 @@ dependencies = [ [[package]] name = "digest" version = "0.11.0-pre.10" -source = "git+https://github.com/RustCrypto/traits.git#915474f1ed5be0a19fd102d5f75ef8e04c765416" +source = "git+https://github.com/RustCrypto/traits.git#1cae37d25c5bc6c59570d5136ccb710e1914b07a" dependencies = [ "block-buffer", "crypto-common", @@ -156,16 +156,16 @@ dependencies = [ [[package]] name = "hmac" version = "0.13.0-pre.5" -source = "git+https://github.com/RustCrypto/MACs.git#64d671d5c375838173d18e30bc14dffc80c13e51" +source = "git+https://github.com/RustCrypto/MACs.git#55327cab3a3aea0cfb3b7fafde6649bbd425beb7" dependencies = [ "digest", ] [[package]] name = "hybrid-array" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dab50e193aebe510fe0e40230145820e02f48dae0cf339ea4204e6e708ff7bd" +checksum = "891d15931895091dea5c47afa5b3c9a01ba634b311919fd4d41388fa0e3d76af" dependencies = [ "typenum", ] @@ -195,14 +195,14 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.170" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "sha1" version = "0.11.0-pre.5" -source = "git+https://github.com/RustCrypto/hashes.git#7d44caf065dbeb3f10a372a26a8b9f1c927f8433" +source = "git+https://github.com/RustCrypto/hashes.git#d9ad085ed12dba58d2a6d75d76a17a1b2706c4c7" dependencies = [ "cfg-if", "cpufeatures", @@ -212,7 +212,7 @@ dependencies = [ [[package]] name = "sha2" version = "0.11.0-pre.5" -source = "git+https://github.com/RustCrypto/hashes.git#7d44caf065dbeb3f10a372a26a8b9f1c927f8433" +source = "git+https://github.com/RustCrypto/hashes.git#d9ad085ed12dba58d2a6d75d76a17a1b2706c4c7" dependencies = [ "cfg-if", "cpufeatures", diff --git a/hkdf/src/sealed.rs b/hkdf/src/sealed.rs index e913e2b..377bea8 100644 --- a/hkdf/src/sealed.rs +++ b/hkdf/src/sealed.rs @@ -2,7 +2,7 @@ use hmac::digest::{ Digest, FixedOutput, KeyInit, Output, Update, block_api::{BlockSizeUser, OutputSizeUser}, }; -use hmac::{Hmac, SimpleHmac, block_api::EagerHash}; +use hmac::{EagerHash, Hmac, SimpleHmac}; pub trait Sealed { fn new_from_slice(key: &[u8]) -> Self; @@ -12,10 +12,7 @@ pub trait Sealed { fn finalize(self) -> Output; } -impl Sealed for Hmac -where - H: EagerHash + OutputSizeUser, -{ +impl Sealed for Hmac { #[inline(always)] fn new_from_slice(key: &[u8]) -> Self { KeyInit::new_from_slice(key).expect("HMAC can take a key of any size") diff --git a/hkdf/tests/rfc5869.rs b/hkdf/tests/rfc5869.rs index 0b16043..af392f0 100644 --- a/hkdf/tests/rfc5869.rs +++ b/hkdf/tests/rfc5869.rs @@ -1,7 +1,7 @@ use hex_literal::hex; -use hkdf::{Hkdf, hmac::block_api::EagerHash}; +use hkdf::{Hkdf, hmac::EagerHash}; use sha1::Sha1; -use sha2::{Sha256, digest::OutputSizeUser}; +use sha2::Sha256; struct Test<'a> { ikm: &'a [u8], @@ -11,7 +11,7 @@ struct Test<'a> { okm: &'a [u8], } -fn rfc_test(tests: &[Test]) { +fn rfc_test(tests: &[Test]) { let mut buf = [0u8; 128]; for test in tests.iter() { let salt = if test.salt.is_empty() {