argon2i function
Encode a password using default Argon2i algorithm
Parameters:
password
is the raw password to be encodedsalt
should be at least 8 bytes long. 16 bytes is recommended.security
is the parameter choice for the algorithm.hashLength
is the number of output byteskey
is an optional key bytes to usepersonalization
is 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);