std1.0.0-beta-7 SafeC docs

std :: crypto::hkdf

Function std::hkdf_expand

#include <std/crypto/hkdf.h> source

generic<H: BlockHash> int hkdf_expand(
    H fresh,
    []const unsigned char prk,
    []const unsigned char info,
    []unsigned char out,
)

OKM = T(1) || T(2) || ... filling out (out.len bytes), T(i) = HMAC-Hash(PRK, T(i-1) || info || i); info may be empty. 0 (nothing written) if out.len > 255 * digest_size(), 1 otherwise.