我正在使用password_verify
来检查我的哈希密码。我使用的是PHP 5.5版本:
// get result row (as an object)
$result_row = $result_of_login_check->fetch_object();
// using PHP 5.5's password_verify() function to check if the provided password fits
// the hash of that user's password
if (password_verify($_POST['user_password'], $result_row->user_password_hash)) {
// ...
}
在password_verify
中我得到了false
。我已经检查了帖子的值和mysql user_password_hash返回值。
我不知道为什么它会返回false。
有任何想法吗?
password_hash
来创建密码? - b.b3rn4rd