Skip to content

Commit

Permalink
Include argon2id in crypto_pwhash_primitive()
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 authored and enclave-alistair committed Dec 11, 2023
1 parent b72d3d1 commit 98b3f1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libsodium/include/sodium/crypto_pwhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ int crypto_pwhash_str_needs_rehash(const char *str,
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));

#define crypto_pwhash_PRIMITIVE "argon2i"
#define crypto_pwhash_PRIMITIVE "argon2id,argon2i"
SODIUM_EXPORT
const char *crypto_pwhash_primitive(void)
__attribute__ ((warn_unused_result));
Expand Down
2 changes: 1 addition & 1 deletion test/default/pwhash_argon2id.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ main(void)
assert(crypto_pwhash_memlimit_moderate() > 0U);
assert(crypto_pwhash_opslimit_sensitive() > 0U);
assert(crypto_pwhash_memlimit_sensitive() > 0U);
assert(strcmp(crypto_pwhash_primitive(), "argon2i") == 0);
assert(strcmp(crypto_pwhash_primitive(), "argon2id,argon2i") == 0);

assert(crypto_pwhash_bytes_min() == crypto_pwhash_BYTES_MIN);
assert(crypto_pwhash_bytes_max() == crypto_pwhash_BYTES_MAX);
Expand Down

0 comments on commit 98b3f1c

Please sign in to comment.