hash static method
Uint8List
hash(
- Uint8List password,
- Uint8List salt, {
- int? outlen,
- int? opslimit,
- int? memlimit,
- 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));
}