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 Salts with the same value.
§Panics
new panics if salt creation fails