summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Ferrara <ircmaxell@gmail.com>2013-04-30 15:57:38 -0400
committerAnthony Ferrara <ircmaxell@gmail.com>2013-04-30 15:57:38 -0400
commit644dc31772c01b680babce40bb7768018a2f10d2 (patch)
tree425249afab55740be2282adcabdf672c12bdce9d
parent0d336a72f1012a375aa3215e7f3e75e58eaad31b (diff)
downloadpassword_compat-644dc31772c01b680babce40bb7768018a2f10d2.zip
password_compat-644dc31772c01b680babce40bb7768018a2f10d2.tar.gz
password_compat-644dc31772c01b680babce40bb7768018a2f10d2.tar.bz2
Reset raw length used as per #11
-rw-r--r--lib/password.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/password.php b/lib/password.php
index afde872..4d0e8b7 100644
--- a/lib/password.php
+++ b/lib/password.php
@@ -46,7 +46,7 @@ if (!defined('PASSWORD_BCRYPT')) {
}
}
// The length of salt to generate
- $raw_salt_len = 17;
+ $raw_salt_len = 16;
// The length required in the final serialization
$required_salt_len = 22;
$hash_format = sprintf("$2y$%02d$", $cost);
@@ -119,7 +119,6 @@ if (!defined('PASSWORD_BCRYPT')) {
}
}
$salt = str_replace('+', '.', base64_encode($buffer));
-
}
$salt = substr($salt, 0, $required_salt_len);