pub struct Salt(/* private fields */);
Expand description
A salt for HKDF operations.
Implementations§
Source§impl 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 Salt
s 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 Freeze for Salt
impl RefUnwindSafe for Salt
impl Send for Salt
impl Sync for Salt
impl Unpin for Salt
impl UnwindSafe for Salt
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 160 bytes