Class: HKDF

HKDF(settings)

Provides an HMAC-based Extract-and-Expand Key Derivation Function (HKDF), compatible with RFC 5869. Defaults to 32 byte output, matching Bitcoin's implementaton.

Constructor

new HKDF(settings)

Create an HKDF instance.
Parameters:
Name Type Description
settings Object List of settings.
Properties
Name Type Attributes Default Description
initial String Input keying material.
algorithm String <optional>
sha256 Name of the hashing algorithm to use.
salt String <optional>
Salt value (a non-secret random value).
Source:

Methods

derive(infoopt, sizeopt)

Derive a new output.
Parameters:
Name Type Attributes Default Description
info Buffer <optional>
Context and application specific information.
size Number <optional>
32 Length of output.
Source: