diff --git a/pkcs5/src/pbes2/encryption.rs b/pkcs5/src/pbes2/encryption.rs index 936c903c0..7a749158a 100644 --- a/pkcs5/src/pbes2/encryption.rs +++ b/pkcs5/src/pbes2/encryption.rs @@ -87,10 +87,14 @@ where TagSize: aes_gcm::TagSize, NonceSize: aes::cipher::ArraySize, { - let msg_len = buffer.len().checked_sub(TagSize::USIZE).ok_or{Error::DecryptFailed)?; + let msg_len = buffer + .len() + .checked_sub(TagSize::USIZE) + .ok_or(Error::DecryptFailed)?; - let gcm = as GcmKeyInit>::new_from_slice(key.as_slice()) - .map_err(|_| es.to_alg_params_invalid())?; + let gcm = + as GcmKeyInit>::new_from_slice(key.as_slice()) + .map_err(|_| es.to_alg_params_invalid())?; let tag = Tag::try_from(&buffer[msg_len..]).map_err(|_| Error::DecryptFailed)?;