argon2id function
Encode a password using default Argon2id 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 argon2id(
List<int> password,
List<int> salt, {
int? hashLength,
List<int>? key,
List<int>? personalization,
Argon2Security security = _defaultSecurity,
}) =>
Argon2(
salt: salt,
type: Argon2Type.argon2id,
hashLength: hashLength,
iterations: security.t,
parallelism: security.p,
memorySizeKB: security.m,
key: key,
personalization: personalization,
).convert(password);