hkdfSha256DeriveKey method
Strict RFC 5869 HKDF-SHA-256 (always Extract-then-Expand).
Omitted salt defaults to 32 zero bytes (ยง2.2) on every backend;
info may be empty. length must be 1..255*32. Throws on
invalid arguments or backend failure.
Implementation
@override
BuBytes hkdfSha256DeriveKey({
required List<int> ikm,
int length = 32,
List<int>? salt,
List<int>? info,
}) {
final result = BuHkdf(
bindings: _bindings,
prf: BuKdfPrf.sha256,
ikm: BuBytes(ikm),
salt: salt == null ? null : BuBytes(salt),
info: info == null ? null : BuBytes(info),
).expand(length: length);
return result.unwrapOrThrowCryptoError().asBytes;
}