deriveKey method

  1. @override
Future<SecretKey> deriveKey({
  1. required SecretKey secretKey,
  2. required List<int> nonce,
  3. List<int> k = const <int>[],
  4. List<int> ad = const <int>[],
})
override

Calculates output of Argon2id algorithm.

Parameter secretKey is the hashed password, which can have any length.

Parameter nonce is the password salt, which can have any length.

Parameters k and ad are optional additional parameters specified by Argon2. They are usually left empty.

Implementation

@override
Future<SecretKey> deriveKey({
  required SecretKey secretKey,
  required List<int> nonce,
  List<int> k = const <int>[],
  List<int> ad = const <int>[],
}) async {
  return deriveKeySync(
    secretKey: secretKey,
    nonce: nonce,
    k: k,
    ad: ad,
  );
}