hashPasswordString method
Future<DArgon2Result>
hashPasswordString(
- String password, {
- required Salt salt,
- int iterations = 32,
- int memory = 256,
- int parallelism = 2,
- int length = 32,
- Argon2Type type = Argon2Type.i,
- Argon2Version version = Argon2Version.V13,
The Future method to hash a String password with Argon2
Needs a UTF-8 String password
and a salt
to be given with
an optional parameters to control the amount of iterations
, memory
,
parallelism
used during the operation. Also optionally takes a length
parameter for the hash's return length, as well as a type
and version
to
pass along to the C method. This method calls the hashPasswordStringSync
method with the given information.
Returns a Future containing a DArgon2Result with the hashed password, encoded hash, and various conversion options for the hash and encoded bytes.
Implementation
Future<DArgon2Result> hashPasswordString(String password,
{required Salt salt,
int iterations = 32,
int memory = 256,
int parallelism = 2,
int length = 32,
Argon2Type type = Argon2Type.i,
Argon2Version version = Argon2Version.V13}) async {
return hashPasswordStringSync(password,
salt: salt,
iterations: iterations,
memory: memory,
parallelism: parallelism,
length: length,
type: type,
version: version);
}