Function extract
Source pub fn extract<H: Hasher>(salt: Option<&[u8]>, ikm: &[u8]) -> Hash
Expand description
HKDF extract step: PRK = HMAC-Hash(salt, IKM).
If salt is None, a string of H::OUTPUT_SIZE zero bytes is used.
§Example
ⓘuse crypto::hkdf;
use crypto::sha2::Sha256;
let prk = hkdf::extract::<Sha256>(Some(b"salt"), b"input key material");