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