DartArgon2id class
Argon2id (RFC 9106) implemented in pure Dart.
The implementation uses DartArgon2State. You can use the state object directly if you are computing many hashes and want to minimize memory allocations.
You can control the number of created isolates with maxIsolates and minBlocksPerSliceForEachIsolate. The default values are usually good.
Examples
See documentation for the class Argon2id.
- Inheritance
-
- Object
- KdfAlgorithm
- Argon2id
- DartArgon2id
Constructors
Properties
- blocksPerProcessingChunk → int?
-
How often (number of blocks) to give computing time to other concurrent
tasks.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hashLength → int
-
Hash length.
final
- iterations → int
-
Number of iterations.
final
- maxIsolates → int?
-
Maximum number of isolates to use.
final
- memory → int
-
Minimum number of 1 kB blocks needed to compute the hash.
final
- minBlocksPerSliceForEachIsolate → int?
-
Minimum number of blocks per isolate.
final
- parallelism → int
-
Maximum number of processors attacker can use concurrently for each
attempt.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → int
-
Argon2id algorithm version number.
no setterinherited
Methods
-
deriveKey(
{required SecretKey secretKey, required List< int> nonce, List<int> optionalSecret = const <int>[], List<int> associatedData = const <int>[]}) → Future<SecretKey> -
Calculates output of Argon2id algorithm.
override
-
deriveKeyFromPassword(
{required String password, required List< int> nonce}) → Future<SecretKey> -
Generates a new secret key from a
password
and anonce
.inherited -
newState(
) → DartArgon2State - Constructs an instance of DartArgon2State.
-
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.
override