com php-src: Reverting PASSWORD_DEFAULT to PASSWORD_BCR YPT: ext/standard/password.c ext/standard/php_passwor d.h

From: Date: Sun, 10 Jul 2016 13:16:55 +0000
Subject: com php-src: Reverting PASSWORD_DEFAULT to PASSWORD_BCR YPT: ext/standard/password.c ext/standard/php_passwor d.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94379@lists.php.net to get a copy of this message
Commit: 1bc381848add707db42671b3c33e1082aa3e7f93 Author: Charles R. Portwood II <charlesportwoodii@erianna.com> Sun, 10 Jul 2016 08:16:55 -0500 Parents: deba2b4572ffe9530a65e225a028536e353dde7b Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1bc381848add707db42671b3c33e1082aa3e7f93 Log: Reverting PASSWORD_DEFAULT to PASSWORD_BCRYPT Indicating constants as defaults Minor coding standards change Changed paths: M ext/standard/password.c M ext/standard/php_password.h Diff: diff --git a/ext/standard/password.c b/ext/standard/password.c index f312df8..ab967ee 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -46,9 +46,9 @@ PHP_MINIT_FUNCTION(password) /* {{{ */ REGISTER_LONG_CONSTANT("PASSWORD_ARGON2", PHP_PASSWORD_ARGON2, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PASSWORD_BCRYPT_DEFAULT_COST", PHP_PASSWORD_BCRYPT_COST, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("PASSWORD_ARGON2_MEMORY_COST", PHP_PASSWORD_ARGON2_MEMORY_COST, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("PASSWORD_ARGON2_TIME_COST", PHP_PASSWORD_ARGON2_TIME_COST, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("PASSWORD_ARGON2_THREADS", PHP_PASSWORD_ARGON2_THREADS, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PASSWORD_ARGON2_DEFAULT_MEMORY_COST", PHP_PASSWORD_ARGON2_MEMORY_COST, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PASSWORD_ARGON2_DEFAULT_TIME_COST", PHP_PASSWORD_ARGON2_TIME_COST, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PASSWORD_ARGON2_DEFAULT_THREADS", PHP_PASSWORD_ARGON2_THREADS, CONST_CS | CONST_PERSISTENT); return SUCCESS; } @@ -212,7 +212,7 @@ PHP_FUNCTION(password_get_info) } /** }}} */ -/* {{{ proto boolean password_needs_rehash(string $hash, integer $algo, array $options) +/* {{{ proto boolean password_needs_rehash(string $hash, integer $algo[, array $options]) Determines if a given hash requires re-hashing based upon parameters */ PHP_FUNCTION(password_needs_rehash) { @@ -351,7 +351,7 @@ PHP_FUNCTION(password_verify) } /* }}} */ -/* {{{ proto string password_hash(string password, int algo, array options = array()) +/* {{{ proto string password_hash(string password, int algo[, array options = array()]) Hash a password */ PHP_FUNCTION(password_hash) { diff --git a/ext/standard/php_password.h b/ext/standard/php_password.h index 7e546b7..e3104f7 100644 --- a/ext/standard/php_password.h +++ b/ext/standard/php_password.h @@ -30,7 +30,7 @@ PHP_FUNCTION(password_get_info); PHP_MINIT_FUNCTION(password); #define PHP_PASSWORD_ARGON2 PHP_PASSWORD_ARGON2I -#define PHP_PASSWORD_DEFAULT PHP_PASSWORD_ARGON2 +#define PHP_PASSWORD_DEFAULT PHP_PASSWORD_BCRYPT #define PHP_PASSWORD_BCRYPT_COST 10 #define PHP_PASSWORD_ARGON2_MEMORY_COST 1<<16

« previous php.cvs (#94379) next »