# Function ring::hkdf::expand [−] [src]

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

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`.

Parameter | RFC 5869 Term
--- | ---
prk | PRK
info | info
out | OKM (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.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)