KeyDerivationApi class abstract interface

PBKDF2 (SHA-256/SHA-512), scrypt and HKDF key derivation.

HKDF follows the per-hash-method convention of PBKDF2 (hkdfSha256DeriveKey / hkdfSha512DeriveKey): one method per hash, no hash-enum parameter. Only SHA-256/SHA-512 — both native transports agree on these two (SHA-1 HKDF stays direct-class-only).

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

hkdfSha256DeriveKey({required List<int> ikm, int length = 32, List<int>? salt, List<int>? info}) → BuBytes
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.
hkdfSha512DeriveKey({required List<int> ikm, int length = 32, List<int>? salt, List<int>? info}) → BuBytes
Strict RFC 5869 HKDF-SHA-512 (always Extract-then-Expand). Omitted salt defaults to 64 zero bytes (§2.2) on every backend; info may be empty. length must be 1..255*64. Throws on invalid arguments or backend failure.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pbkdf2Sha256DeriveKey({required List<int> password, required List<int> salt, required int iterations, required int length}) → BuBytes
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.
pbkdf2Sha512DeriveKey({required List<int> password, required List<int> salt, required int iterations, required int length}) → BuBytes
Derives length bytes with PBKDF2-HMAC-SHA512 from arbitrary password/salt. iterations and length must be non-negative. Throws on negative values or backend failure.
scryptDeriveKey({required List<int> password, required List<int> salt, required int dkLen, required int r, required int n, required int p}) → BuBytes
Derives dkLen bytes with scrypt from arbitrary password/salt. dkLen, r, n, p must be non-negative. Throws on negative values or backend failure.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited