go1.20.5
GoThrough

hkdf.Expand

// Expand returns a Reader, from which keys can be read, using the given // pseudorandom key and optional context info, skipping the extraction step. // // The pseudorandomKey should have been generated by Extract, or be a uniformly // random or pseudorandom cryptographically strong key. See RFC 5869, Section // 3.3. Most common scenarios will want to use New instead. func Expand(hash func() hash.Hash, pseudorandomKey []byte, info []byte) io.Reader

hkdf.Extract

// Extract generates a pseudorandom key for use with Expand from an input secret // and an optional independent salt. // // Only use this function if you need to reuse the extracted key with multiple // Expand invocations and different context values. Most common scenarios, // including the generation of multiple keys, should use New instead. func Extract(hash func() hash.Hash, secret []byte, salt []byte) []byte

hkdf.New

// New returns a Reader, from which keys can be read, using the given hash, // secret, salt and context info. Salt and info can be nil. func New(hash func() hash.Hash, secret []byte, salt []byte, info []byte) io.Reader