docs

v0.1.2 문서를 보고 있습니다. 이 버전은 더 이상 지원하지 않습니다. 최신 릴리스: v0.1.3 →

core::crypto::hkdf

API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.

HKDF (RFC 5869) over any HashAlgorithm: extract a pseudorandom key, expand it into output keying material.

Functions

extractSource

pub fn extract<S: AsBytes, I: AsBytes>(alg: HashAlgorithm, salt: S, ikm: I) -> Secret

HMAC(salt, ikm); an empty salt is output_len zero bytes.

expandSource

pub fn expand<P: AsBytes, I: AsBytes>(alg: HashAlgorithm, prk: P, info: I, len: usize) throws (ValueError) -> Secret

len bytes of output keying material; len is at most 255 * output_len.