diff --git a/src/aes.rs b/src/aes.rs index 4e8abff7..bbf30a8b 100644 --- a/src/aes.rs +++ b/src/aes.rs @@ -95,7 +95,7 @@ impl AesReader { return Ok(None); } - let cipher = cipher_from_mode(self.aes_mode, &decrypt_key); + let cipher = cipher_from_mode(self.aes_mode, decrypt_key); let hmac = Hmac::::new_varkey(hmac_key).unwrap(); Ok(Some(AesReaderValid { diff --git a/src/read.rs b/src/read.rs index eeff3808..e5a84c48 100644 --- a/src/read.rs +++ b/src/read.rs @@ -185,6 +185,7 @@ fn find_content<'a>( Ok((reader as &mut dyn Read).take(data.compressed_size)) } +#[allow(clippy::too_many_arguments)] fn make_crypto_reader<'a>( compression_method: crate::compression::CompressionMethod, crc32: u32, @@ -211,7 +212,7 @@ fn make_crypto_reader<'a>( } #[cfg(feature = "aes-crypto")] (Some(password), Some((aes_mode, vendor_version))) => { - match AesReader::new(reader, aes_mode, compressed_size).validate(&password)? { + match AesReader::new(reader, aes_mode, compressed_size).validate(password)? { None => return Ok(Err(InvalidPassword)), Some(r) => CryptoReader::Aes { reader: r,