Skip to content

Commit

Permalink
pkcs5: fix type annotation required error (#1625)
Browse files Browse the repository at this point in the history
Co-authored-by: Tony Arcieri <[email protected]>
  • Loading branch information
quexten and tarcieri authored Dec 20, 2024
1 parent 4083484 commit 5df7daf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkcs5/src/pbes2/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl EncryptionKey {
pub fn derive_from_password(password: &[u8], kdf: &Kdf, key_size: usize) -> Result<Self> {
// 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());
}
}
Expand Down

0 comments on commit 5df7daf

Please sign in to comment.