Function hacl::hazmat::hkdf::sha2_256::expand

source ยท
pub fn expand<const OKM_LEN: usize>(
    prk: &[u8],
    info: &[u8],
) -> Result<[u8; OKM_LEN], Error>
Expand description

HKDF expand using the pre-key material prk and info. The output length is defined through the result type. Returns the key material in an array of length okm_len or Error::OkmTooLarge if the requested okm_len is too large.

Note that this function returns an Error::ArgumentsTooLarge if salt, ikm, or OKM_LEN is larger than 2**32 bytes.