Enable to use system libargon2.

Rename --disable-argon2 to --disable-internal-argon2 option
and add --enable-libargon2 flag to allow system libarhgon2.
This commit is contained in:
Milan Broz
2017-10-04 12:07:55 +02:00
parent 7e53c87f5c
commit 8dc35a7906
10 changed files with 30 additions and 20 deletions

View File

@@ -363,10 +363,8 @@ int crypt_pbkdf(const char *kdf, const char *hash,
if (!strcmp(kdf, "pbkdf2"))
return pbkdf2(hash, password, password_length, salt, salt_length,
key, key_length, iterations);
#if USE_INTERNAL_ARGON2
else if (!strncmp(kdf, "argon2", 6))
return argon2(kdf, password, password_length, salt, salt_length,
key, key_length, iterations, memory, parallel);
#endif
return -EINVAL;
}