HMAC-based Extract-and-Expand Key Derivation Function (HKDF) in pure V Language. See RFC 5869 for more detail.
new creates a new instance of Hkdf with hash h
fn new(h crypto.Hash) &Hkdfexpand expands pseudorandom key to build output keying material using underlying crypto.Hash prk was a pseudorandom key of at least HashLen octets (usually, the output from the extract step) info is optional context and application specific information (can be a zero-length string)
pub fn expand(h crypto.Hash, prk []u8, info []u8, length int) ![]u8extract generates a pseudorandom key for use with Expand from an input secret and an optional independent salt.
pub fn extract(h crypto.Hash, salt []u8, ikm []u8) ![]u8fn (k Hkdf) hasher() crypto.Hashfn (k Hkdf) sum(data []u8) ![]u8sum return sum of the data for Hkdf hash
fn (k Hkdf) size() !intsize return size of the checksum underlying hash
fn (k Hkdf) hmac(key []u8, data []u8) ![]u8hmac create new hmac
fn (k Hkdf) extract(salt []u8, ikm []u8) ![]u8extract create pseudorandom key (prk) from input given.
its output is hmac based hash with length (size) of Hashing checksum size
fn (k Hkdf) expand(prk []u8, info []u8, length int) ![]u8// expand expand pseudorandom key to build output keying materi.
where length is the length of output keying material in octets (<= 255*HashLen) where HashLen denotes the length of the hash function output in octets