【发布时间】:2018-03-02 10:47:57
【问题描述】:
在我的登录页面中,password_verify 后出现错误,好像我在验证密码时使用了 hash_equals。需要知道原因。
第二个问题是每次我通过更改密码页面更改密码时 hash_equals 不验证密码。以下是代码
if (!password_verify($password, $user['password'])) {
$errors[]='Password does not match';
}
if (!hash_equals($password, $user['password'])) {
$errors[]='Password does not match';
}
【问题讨论】:
-
这两个功能的手册你都看过了吗?