HashKdf class

RFC 5054 compliant hash-based KDF.

Implements: x = H(s, H( I | ':' | p ))

This is primarily offered for compatibility with other SRP implementations using the non-standard KDF found in RFC 5054. It is fast to compute, which improves performance, but decreases security since its speed allows faster cracking, especially when using GPUs and other highly parallel compute.

To reduce the chance of cracking attacks, generally a more secure (and hence deliberately slower) KDF should be used in production, such as Argon2id, scrypt, or high-iteration PBKDF2.

Implemented types

Constructors

HashKdf({required String name, required HashFunction hashFunction})

Properties

hashCode int
The hash code for this object.
no setterinherited
hashFunction HashFunction
final
name String
Name of the KDF algorithm.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deriveKeyFromPasswordBytes({required Uint8List passwordBytes, required Uint8List salt, Uint8List? userIdBytes}) Future<Uint8List>
Derives a key from password bytes and salt.
override
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