note 128794 added to function.password-verify
| From: | codactatecnologia at gmail dot com | Date: | Sat, 12 Aug 2023 15:58:36 +0000 |
| Subject: | note 128794 added to function.password-verify | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220754@lists.php.net to get a copy of this message | ||
I'm using the example code on phptester.com, and the result is "Invalid password."
// See the password_hash() example to see where this came from.
$hash = '$2y$07$BCrypts22Chrcte/VlQH0piJtjXl.0t1XkA8pw9dMXTpOq';
if (password_verify('rasmuslerdorf', $hash)) {
echo 'Password is valid!';
} else {
echo 'Invalid password.';
}
output:
Invalid password.
Why?
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 2804:14c:5983:88a3:5464:44bd:54f5:5c70)
----
Manual Page -- https://php.net/manual/en/function.password-verify.php
Edit -- https://main.php.net/note/edit/128794
Del: integrated -- https://main.php.net/note/delete/128794/integrated
Del: useless -- https://main.php.net/note/delete/128794/useless
Del: bad code -- https://main.php.net/note/delete/128794/bad+code
Del: spam -- https://main.php.net/note/delete/128794/spam
Del: non-english -- https://main.php.net/note/delete/128794/non-english
Del: in docs -- https://main.php.net/note/delete/128794/in+docs
Del: other reasons-- https://main.php.net/note/delete/128794
Reject -- https://main.php.net/note/reject/128794
Search -- https://main.php.net/manage/user-notes.php