Argon2.fromSecurity constructor

Argon2.fromSecurity(
  1. Argon2Security security, {
  2. List<int>? salt,
  3. List<int>? key,
  4. int? hashLength,
  5. List<int>? personalization,
})

Creates an Argon2 instance from Argon2Security parameter.

Implementation

factory Argon2.fromSecurity(
  Argon2Security security, {
  List<int>? salt,
  List<int>? key,
  int? hashLength,
  List<int>? personalization,
}) {
  return Argon2(
    salt: salt,
    version: security.version,
    type: security.type,
    hashLength: hashLength,
    iterations: security.t,
    parallelism: security.p,
    memorySizeKB: security.m,
    key: key,
    personalization: personalization,
  );
}