From 5df7daf012f2fcfa3d97896942acf11e8069e77a Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Fri, 20 Dec 2024 18:48:26 +0100 Subject: [PATCH] pkcs5: fix type annotation required error (#1625) Co-authored-by: Tony Arcieri --- pkcs5/src/pbes2/encryption.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkcs5/src/pbes2/encryption.rs b/pkcs5/src/pbes2/encryption.rs index b5259e997..7413644f0 100644 --- a/pkcs5/src/pbes2/encryption.rs +++ b/pkcs5/src/pbes2/encryption.rs @@ -178,7 +178,7 @@ impl EncryptionKey { pub fn derive_from_password(password: &[u8], kdf: &Kdf, key_size: usize) -> Result { // if the kdf params defined a key length, ensure it matches the required key size if let Some(len) = kdf.key_length() { - if key_size != len.into() { + if key_size != usize::from(len) { return Err(kdf.to_alg_params_invalid()); } }