diff options
Diffstat (limited to 'ext/standard/php_password.h')
| -rw-r--r-- | ext/standard/php_password.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/standard/php_password.h b/ext/standard/php_password.h index 46ed4f0368..ce3fdba6bb 100644 --- a/ext/standard/php_password.h +++ b/ext/standard/php_password.h @@ -33,9 +33,16 @@ PHP_MSHUTDOWN_FUNCTION(password); #define PHP_PASSWORD_BCRYPT_COST 10 #if HAVE_ARGON2LIB -#define PHP_PASSWORD_ARGON2_MEMORY_COST 1<<10 +/** + * OPSLIMIT and MEMLIMIT are taken from libsodium's MODERATE values. + * Threads are fixed at 1 by libsodium. + * + * When updating these values, synchronize ext/sodium/sodium_pwhash.c values. + * Note that libargon expresses memlimit in KB, while libsoidum uses bytes. + */ +#define PHP_PASSWORD_ARGON2_MEMORY_COST (256 << 10) #define PHP_PASSWORD_ARGON2_TIME_COST 3 -#define PHP_PASSWORD_ARGON2_THREADS 2 +#define PHP_PASSWORD_ARGON2_THREADS 1 #endif typedef struct _php_password_algo { |
