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).
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
saltdefaults to 32 zero bytes (§2.2) on every backend;infomay be empty.lengthmust 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
saltdefaults to 64 zero bytes (§2.2) on every backend;infomay be empty.lengthmust 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
lengthbytes with PBKDF2-HMAC-SHA256 from arbitrarypassword/salt.iterationsandlengthmust 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
lengthbytes with PBKDF2-HMAC-SHA512 from arbitrarypassword/salt.iterationsandlengthmust 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
dkLenbytes with scrypt from arbitrarypassword/salt.dkLen,r,n,pmust 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