Function ring::hkdf::expand

source · []
pub fn expand(prk: &SigningKey, info: &[u8], out: &mut [u8])
Expand description

Fills out with the output of the HKDF-Expand operation for the given inputs.

prk should be the return value of an earlier call to extract.

ParameterRFC 5869 Term
prkPRK
infoinfo
outOKM (Output Keying Material)
out.len()L (Length of output keying material in bytes)

Panics

expand panics if the requested output length is larger than 255 times the size of the digest algorithm, i.e. if out.len() > 255 * salt.digest_algorithm().output_len. This is the limit imposed by the HKDF specification, and is necessary to prevent overflow of the 8-bit iteration counter in the expansion step.