argon2i function

Argon2HashDigest argon2i(
  1. List<int> password,
  2. List<int> salt, {
  3. int? hashLength,
  4. List<int>? key,
  5. List<int>? personalization,
  6. Argon2Security security = _defaultSecurity,
})

Encode a password using default Argon2i algorithm

Parameters:

  • password is the raw password to be encoded
  • salt 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 bytes
  • key is an optional key bytes to use
  • personalization 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);