From f28fe0ae292ad7f79e2ac8214bd6956658a79b3f Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 29 Jul 2017 18:02:13 +0200 Subject: [PATCH] Cap argon2*_BYTES_MAX to SODIUM_SIZE_MAX --- src/libsodium/include/sodium/crypto_pwhash_argon2i.h | 2 +- src/libsodium/include/sodium/crypto_pwhash_argon2id.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsodium/include/sodium/crypto_pwhash_argon2i.h b/src/libsodium/include/sodium/crypto_pwhash_argon2i.h index a405f563..25259915 100644 --- a/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +++ b/src/libsodium/include/sodium/crypto_pwhash_argon2i.h @@ -22,7 +22,7 @@ int crypto_pwhash_argon2i_alg_argon2i13(void); SODIUM_EXPORT size_t crypto_pwhash_argon2i_bytes_min(void); -#define crypto_pwhash_argon2i_BYTES_MAX 4294967295U +#define crypto_pwhash_argon2i_BYTES_MAX SODIUM_MIN(SODIUM_SIZE_MAX, 4294967295U) SODIUM_EXPORT size_t crypto_pwhash_argon2i_bytes_max(void); diff --git a/src/libsodium/include/sodium/crypto_pwhash_argon2id.h b/src/libsodium/include/sodium/crypto_pwhash_argon2id.h index 46432cd2..0a35f0cf 100644 --- a/src/libsodium/include/sodium/crypto_pwhash_argon2id.h +++ b/src/libsodium/include/sodium/crypto_pwhash_argon2id.h @@ -22,7 +22,7 @@ int crypto_pwhash_argon2id_alg_argon2id13(void); SODIUM_EXPORT size_t crypto_pwhash_argon2id_bytes_min(void); -#define crypto_pwhash_argon2id_BYTES_MAX 4294967295U +#define crypto_pwhash_argon2id_BYTES_MAX SODIUM_MIN(SODIUM_SIZE_MAX, 4294967295U) SODIUM_EXPORT size_t crypto_pwhash_argon2id_bytes_max(void);