Skip to content

Commit

Permalink
no need to ref a slice
Browse files Browse the repository at this point in the history
  • Loading branch information
xoloki committed Dec 18, 2024
1 parent 5d08659 commit 24a6ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub fn decrypt(key: &[u8; 32], data: &[u8]) -> Result<Vec<u8>, EncryptionError>
if cipher_data.is_empty() {
return Err(EncryptionError::MissingData);
}
let nonce = Nonce::from_slice(&nonce_data);
let nonce = Nonce::from_slice(nonce_data);
let cipher = Aes256Gcm::new(key.into());

Ok(cipher.decrypt(nonce, cipher_data)?)
Expand Down

0 comments on commit 24a6ee8

Please sign in to comment.