pub struct H0(/* private fields */);
Expand description
Initial H value for Argon2
It’s recommended to use only the argon2
function directly, but
this allow to disassociate the chosen arguments (password, salt, aad),
from the computationally and memory intensive tasks that argon2 go
through to derive the final result.
After H0 is computed with one call to blake2, the secret values to the overall argon2 call can be disposed of, allowing for potentially tighter security around the secrets
Implementations§
Source§impl H0
impl H0
Sourcepub fn new(
params: &Params,
password: &[u8],
salt: &[u8],
key: &[u8],
aad: &[u8],
tag_length: u32,
) -> Self
pub fn new( params: &Params, password: &[u8], salt: &[u8], key: &[u8], aad: &[u8], tag_length: u32, ) -> Self
Create a new initial hash value for Argon2
The secret material to argon2 (password and key) can be disposed of after this call, and the computation of the value is fast compared to running argon2
Trait Implementations§
Auto Trait Implementations§
impl Freeze for H0
impl RefUnwindSafe for H0
impl Send for H0
impl Sync for H0
impl Unpin for H0
impl UnwindSafe for H0
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more