The digest algorithm to use.
The salt value. Must be provided but can be zero-length.
Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
The length of the key to generate. Must be greater than 0. The maximum allowable value is 255 times the number of bytes produced by the selected digest function (e.g. sha512
generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
HKDF is a simple key derivation function defined in RFC 5869. The given
ikm,saltandinfoare used with thedigestto derive a key ofkeylenbytes.The supplied
callbackfunction is called with two arguments:errandderivedKey. If an errors occurs while deriving the key,errwill be set; otherwiseerrwill benull. The successfully generatedderivedKeywill be passed to the callback as an ArrayBuffer. An error will be thrown if any of the input arguments specify invalid values or types.