summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjohncongdon <john@johncongdon.com>2013-05-09 19:01:28 -0600
committerjohncongdon <john@johncongdon.com>2013-05-09 19:01:28 -0600
commit04b9a755749f0cc202d1eb5d51d0d5082b0c6cf2 (patch)
tree093425b7ed7f96d341577a5b6ee163313f1e556d
parent432ce5617c34c6e5d89a99efe5107ff5b1dcac26 (diff)
downloadpassword_compat-04b9a755749f0cc202d1eb5d51d0d5082b0c6cf2.zip
password_compat-04b9a755749f0cc202d1eb5d51d0d5082b0c6cf2.tar.gz
password_compat-04b9a755749f0cc202d1eb5d51d0d5082b0c6cf2.tar.bz2
Rely on checking for PASSWORD_DEFAULT, which should ALWAYS be available.
Since this is supposed to be forward compatible. What happens if BCRYPT is pulled one day for any reason? This would break forward compatibility, but relying on PASSWORD_DEFAULT should be safe. I think another option would be: if ( ! function_exists('password_hash') ) { }
-rw-r--r--lib/password.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/password.php b/lib/password.php
index 4d0e8b7..faa5eaa 100644
--- a/lib/password.php
+++ b/lib/password.php
@@ -7,7 +7,7 @@
* @copyright 2012 The Authors
*/
-if (!defined('PASSWORD_BCRYPT')) {
+if (!defined('PASSWORD_DEFAULT')) {
define('PASSWORD_BCRYPT', 1);
define('PASSWORD_DEFAULT', PASSWORD_BCRYPT);