pbkdf2Sha256DeriveKey method
Derives length bytes with PBKDF2-HMAC-SHA256 from arbitrary password/salt.
iterations and length must be non-negative. Throws on negative values or backend failure.
Implementation
@override
BuBytes pbkdf2Sha256DeriveKey({
required List<int> password,
required List<int> salt,
required int iterations,
required int length,
}) {
final result = BuKdf.pbkdf2(
_bindings,
prf: BuKdfPrf.sha256,
password: password,
salt: salt,
iterations: iterations,
length: length,
);
return result.unwrapOrThrowCryptoError().asBytes;
}