Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Jan 1, 2025
1 parent 8792669 commit fa2a33c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions crates/bitwarden-crypto/src/keys/master_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,8 @@ pub(super) fn decrypt_user_key(
key: &SymmetricCryptoKey,
user_key: EncString,
) -> Result<SymmetricCryptoKey> {
let mut dec: Vec<u8> = match user_key {
_ => {
let stretched_key = stretch_kdf_key(key)?;
user_key.decrypt_with_key(&stretched_key)?
}
};
let stretched_key = stretch_kdf_key(key)?;
let mut dec: Vec<u8> = user_key.decrypt_with_key(&stretched_key)?;

SymmetricCryptoKey::try_from(dec.as_mut_slice())
}
Expand Down

0 comments on commit fa2a33c

Please sign in to comment.