SHOW:
|
|
- or go back to the newest paste.
1 | - | //Returns false |
1 | + | <?php |
2 | - | var_dump($this->security->checkHash('password', '$2a$12$aSa7zLEd24zjh2aoUasxd.hbxIm8IQ0/vMf/8p4LTYI3VtZMJ62Pe')); |
2 | + | |
3 | - | //Returns True |
3 | + | $security = new Phalcon\Security(); |
4 | - | var_dump(password_verify('password', '$2a$12$aSa7zLEd24zjh2aoUasxd.hbxIm8IQ0/vMf/8p4LTYI3VtZMJ62Pe')); |
4 | + | $password = 'password'; |
5 | $hash = $security->hash($password); | |
6 | ||
7 | var_dump($security->checkHash($password, $hash)); | |
8 | var_dump(password_verify($password, $hash)); |