HMAC-based Extract-and-Expand Key Derivation Function.
HKDF is specified in RFC 5869.
In most situations, it is best to use
extract_and_expand to do both the
HKDF-Extract and HKDF-Expand as one atomic operation. It is only necessary
to use the separate
extract functions if a single derived
PRK (defined in RFC 5869) is used more than once.
Salts have type
hmac::SigningKey instead of
&[u8] because they are
frequently used for multiple HKDF operations, and it is more efficient to
SigningKey once and reuse it. Given a digest algorithm
digest_alg and a salt
salt: &[u8], the
SigningKey should be
The HKDF-Extract operation.