Properly support Argon2id in crypto_pwhash()
This commit is contained in:
parent
491f785274
commit
d338ae9512
@ -132,10 +132,12 @@ crypto_pwhash(unsigned char * const out, unsigned long long outlen,
|
||||
unsigned long long opslimit, size_t memlimit, int alg)
|
||||
{
|
||||
switch (alg) {
|
||||
case crypto_pwhash_ALG_ARGON2ID13:
|
||||
case crypto_pwhash_ALG_ARGON2I13:
|
||||
return crypto_pwhash_argon2i(out, outlen, passwd, passwdlen, salt,
|
||||
opslimit, memlimit, alg);
|
||||
case crypto_pwhash_ALG_ARGON2ID13:
|
||||
return crypto_pwhash_argon2id(out, outlen, passwd, passwdlen, salt,
|
||||
opslimit, memlimit, alg);
|
||||
default:
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user