Struct ring::hkdf::Salt [−][src]
pub struct Salt(_);
A salt for HKDF operations.
Implementations
impl Salt[src]
impl Salt[src]pub fn new(algorithm: Algorithm, value: &[u8]) -> Self[src]
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.
pub fn extract(&self, secret: &[u8]) -> Prk[src]
The HKDF-Extract operation.
pub fn algorithm(&self) -> Algorithm[src]
The algorithm used to derive this salt.