hash static method

Uint8List hash(
  1. Uint8List password,
  2. Uint8List salt, {
  3. int? outlen,
  4. int? opslimit,
  5. int? memlimit,
  6. PasswordHashAlgorithm alg = PasswordHashAlgorithm.Default,
})
override

Derives a hash from given password and salt.

Implementation

static Uint8List hash(Uint8List password, Uint8List salt,
    {int? outlen,
    int? opslimit,
    int? memlimit,
    PasswordHashAlgorithm alg = PasswordHashAlgorithm.Default}) {
  outlen ??= Sodium.cryptoPwhashBytesMin;
  opslimit ??= Sodium.cryptoPwhashOpslimitInteractive;
  memlimit ??= Sodium.cryptoPwhashMemlimitInteractive;

  return Sodium.cryptoPwhash(
      outlen, password, salt, opslimit, memlimit, _alg(alg));
}