argon2d function
Encode a password using default Argon2d algorithm
Parameters:
passwordis the raw password to be encodedsaltshould be at least 8 bytes long. 16 bytes is recommended.securityis the parameter choice for the algorithm.hashLengthis the number of output byteskeyis an optional key bytes to usepersonalizationis optional additional data bytes
Implementation
Argon2HashDigest argon2d(
List<int> password,
List<int> salt, {
int? hashLength,
List<int>? key,
List<int>? personalization,
Argon2Security security = _defaultSecurity,
}) =>
Argon2(
salt: salt,
type: Argon2Type.argon2d,
hashLength: hashLength,
iterations: security.t,
parallelism: security.p,
memorySizeKB: security.m,
key: key,
personalization: personalization,
).convert(password);