hkdf library

HKDF cryptography wrappers and parametrization.

https://datatracker.ietf.org/doc/html/rfc5869

Functions

expand({required Uint8List prk, required Uint8List info, int length = 32}) Uint8List
Derives a key, using the given pseudorandom key and optional context info, skipping the extraction step.
extract({required Uint8List secret, required Uint8List salt}) Uint8List
Generates a pseudorandom key for use with expand from an input secret and an optional independent salt.
key({required Uint8List secret, required Uint8List salt, required Uint8List info, int length = 32}) Uint8List
Derives a key from the secret, salt, and info using HKDF-SHA256, returning a byte array that can be used as a cryptographic key.