pub struct Salt(_);Expand description
A salt for HKDF operations.
Implementations
sourceimpl Salt
 
impl Salt
sourcepub fn new(algorithm: Algorithm, value: &[u8]) -> Self
 
pub fn new(algorithm: Algorithm, value: &[u8]) -> Self
Constructs a new Salt with the given value based on the given digest
algorithm.
Constructing a Salt is relatively expensive so it is good to reuse a
Salt object instead of re-constructing Salts with the same value.
sourcepub fn extract(&self, secret: &[u8]) -> Prk
 
pub fn extract(&self, secret: &[u8]) -> Prk
The HKDF-Extract operation.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Salt
impl Send for Salt
impl Sync for Salt
impl Unpin for Salt
impl UnwindSafe for Salt
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more