HkdfSha256 class
HKDF-SHA256 (RFC 5869): extract-then-expand key derivation.
Deterministic — the same (ikm, salt, info, length) always yields the
same output, so two parties holding the same input key material derive
identical sub-keys without communicating (e.g. a shared group secret's
per-label export, or NoPorts session keys).
Constructors
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
deriveKey(
Uint8List ikm, {Uint8List? salt, Uint8List? info, required int length}) → Uint8List -
Derives
lengthbytes from input-key-materialikm, optionally keyed bysalt(defaults to all-zeros, per RFC 5869) and bound to a contextinfo(defaults to empty). -
expand(
Uint8List prk, {Uint8List? info, required int length}) → Uint8List -
RFC 5869 Expand on its own:
T(i) = HMAC-SHA256(prk, T(i-1) || info || i), truncated tolength. -
extract(
Uint8List ikm, {Uint8List? salt}) → Uint8List -
RFC 5869 Extract on its own:
PRK = HMAC-SHA256(salt, ikm).