HKDF.expand

ubyte[] expand(const(ubyte)[] prk, const(ubyte)[] info, size_t length)

HKDF-Expand Step.

Expands a pseudorandom key (PRK) into output keying material (OKM).

Parameters

prkThe pseudorandom key (usually output of extract). Must be at least HashLen bytes (RFC 5869 section 2.3).
infoContext and application specific information (can be null/empty).
lengthThe desired length of the output keying material (OKM).

Returns

The output keying material (OKM).

Throws

CryptoException if prk is shorter than HashLen bytes or

length exceeds 255 * HashLen.