diff options
author | ircmaxell <ircmaxell@gmail.com> | 2012-07-03 08:46:05 -0300 |
---|---|---|
committer | ircmaxell <ircmaxell@gmail.com> | 2012-07-03 08:46:05 -0300 |
commit | f35795ae25597ed3d3758defc26beb1901e76313 (patch) | |
tree | 388922520343c3c947f9957a1c071f2012985c1f | |
parent | 2d6353f5ee2258e5cdda445802a8469e796da0b5 (diff) | |
download | password_compat-f35795ae25597ed3d3758defc26beb1901e76313.zip password_compat-f35795ae25597ed3d3758defc26beb1901e76313.tar.gz password_compat-f35795ae25597ed3d3758defc26beb1901e76313.tar.bz2 |
Update for removal of php.ini setting.
-rw-r--r-- | lib/password.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/password.php b/lib/password.php index 6f300d0..0bb7fe7 100644 --- a/lib/password.php +++ b/lib/password.php @@ -4,7 +4,7 @@ defined('PASSWORD_BCRYPT') or define('PASSWORD_BCRYPT', '2y'); defined('PASSWORD_DEFAULT') or define('PASSWORD_DEFAULT', PASSWORD_BCRYPT); -ini_get('password.bcrypt_cost') or ini_set('password.bcrypt_cost', '11'); +defined('PASSWORD_BCRYPT_COST') or define('PASSWORD_BCRYPT_COST', 10); if (!function_exists('password_hash')) { function password_hash($password, $algo = PASSWORD_DEFAULT, $options = array()) { @@ -21,7 +21,7 @@ if (!function_exists('password_hash')) { } switch ($algo) { case PASSWORD_BCRYPT: - $cost = (int) ini_get('password.bcrypt_cost'); + $cost = PASSWORD_BCRYPT_COST; if (isset($options['cost'])) { $cost = $options['cost']; if ($cost < 4 || $cost > 31) { |