mirror of
https://github.com/bitwarden/browser
synced 2026-02-04 10:43:47 +00:00
Remove unnecessary clippy allow
This commit is contained in:
@@ -6,16 +6,12 @@ use aes::cipher::{
|
||||
block_padding::Pkcs7, generic_array::GenericArray, typenum::U32, BlockDecryptMut, KeyIvInit,
|
||||
};
|
||||
|
||||
#[allow(clippy::question_mark)]
|
||||
pub fn decrypt_aes256(iv: &[u8; 16], data: &[u8], key: GenericArray<u8, U32>) -> Result<Vec<u8>> {
|
||||
let iv = GenericArray::from_slice(iv);
|
||||
let mut data = data.to_vec();
|
||||
let result = cbc::Decryptor::<aes::Aes256>::new(&key, iv)
|
||||
cbc::Decryptor::<aes::Aes256>::new(&key, iv)
|
||||
.decrypt_padded_mut::<Pkcs7>(&mut data)
|
||||
.map_err(|_| anyhow!("Failed to decrypt data"));
|
||||
if let Err(e) = result {
|
||||
return Err(e);
|
||||
}
|
||||
.map_err(|_| anyhow!("Failed to decrypt data"))?;
|
||||
Ok(data)
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
pub mod chromium;
|
||||
pub mod chromium;
|
||||
Reference in New Issue
Block a user