mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-18 21:34:37 +03:00
ciphers: Remove redundant mutability
This commit is contained in:
@@ -33,8 +33,8 @@ pub fn hash<'a>(key: &'a [u8], data: &'a [u8]) -> impl To<[u8], anyhow::Result<(
|
|||||||
// out the right way to use the imports while allowing for zeroization.
|
// out the right way to use the imports while allowing for zeroization.
|
||||||
// An API based on slices might actually be simpler.
|
// An API based on slices might actually be simpler.
|
||||||
let mut tmp = Zeroizing::new([0u8; OUT_LEN]);
|
let mut tmp = Zeroizing::new([0u8; OUT_LEN]);
|
||||||
let mut tmp = GenericArray::from_mut_slice(tmp.as_mut());
|
let tmp = GenericArray::from_mut_slice(tmp.as_mut());
|
||||||
h.finalize_into(&mut tmp);
|
h.finalize_into(tmp);
|
||||||
copy_slice(tmp.as_ref()).to(out);
|
copy_slice(tmp.as_ref()).to(out);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
Reference in New Issue
Block a user