跳到主要内容

expand

函数 expand 

Source
pub fn expand<T, const N: usize>(
    expander: &dyn HkdfExpander,
    info: &[&[u8]],
) -> T
where T: From<[u8; N]>,
展开描述

HKDF-Expand(PRK, info, L) 到 construct any type 从 一个 byte array.

  • PRK is the implicit key material represented by this instance.
  • L := N; N is the size of the byte array.
  • info is a slice of byte slices, which should be processed sequentially (or concatenated if that is not possible).

This is infallible, because the set of types (并 therefore their length) is known at compile time.