| Newsgroups |
php.notes |
| Message-ID |
<[email protected]> |
Most (old) examples here show how to generate a salt. But it's better to use the password_hash(...) function for this. This is mentioned in the 3th paragraph ("Use of password_hash() is encouraged."). password_hash(...) will automatically generate a salt that's concatenated to the generated hash string.
The function password_verify(...) will automatically use the concatenated salt to compare the hashes. So there's no need to generate a salt yourself at all.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 213.219.161.179)
----
Manual Page -- https://php.net/manual/en/function.crypt.php
Edit -- https://main.php.net/note/edit/130174
Del: integrated -- https://main.php.net/note/delete/130174/integrated
Del: useless -- https://main.php.net/note/delete/130174/useless
Del: bad code -- https://main.php.net/note/delete/130174/bad+code
Del: spam -- https://main.php.net/note/delete/130174/spam
Del: non-english -- https://main.php.net/note/delete/130174/non-english
Del: in docs -- https://main.php.net/note/delete/130174/in+docs
Del: other reasons-- https://main.php.net/note/delete/130174
Reject -- https://main.php.net/note/reject/130174
Search -- https://main.php.net/manage/user-notes.php