Skip to content

Commit

Permalink
Update crates/bitwarden/src/crypto/enc_string.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel García <[email protected]>
  • Loading branch information
Hinton and dani-garcia authored Nov 20, 2023
1 parent e051c19 commit 922df2f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crates/bitwarden/src/crypto/enc_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,8 @@ impl EncString {
mac_key: GenericArray<u8, U32>,
key: GenericArray<u8, U32>,
) -> Result<EncString> {
let enc = super::encrypt_aes256_hmac(data_dec, mac_key, key)?;

Ok(EncString::AesCbc256_HmacSha256_B64 {
iv: enc.0,
mac: enc.1,
data: enc.2,
})
let (iv, mac, data) = super::encrypt_aes256_hmac(data_dec, mac_key, key)?;
Ok(EncString::AesCbc256_HmacSha256_B64 { iv, mac, data })
}

/// The numerical representation of the encryption type of the [EncString].
Expand Down

0 comments on commit 922df2f

Please sign in to comment.