4 ms·
If you’re using PHP 5.5+, this should be all you need to securely save passwords: $sHash = password_hash('ThePassword', PASSWORD_BCRYPT, ['cost' => 12]); Ch
by FabianBeiner 12y ago
If you’re using PHP 5.5+, this should be all you need to securely save passwords:
$sHash = password_hash('ThePassword', PASSWORD_BCRYPT, ['cost' => 12]);
Checking is as easily as:
if (password_verify('ThePassword', $sHash)) {…}
Or do you guys have other thoughts?
- kxo 12y agobase64 encode the password, reverse the encoded result.
- cpach 12y agoWhat security advantage would that yield?
- sarciszewski 12y agohttp://cryptofails.com http://cryptofails.com -- I believe they're referring to 46ESAB the worst password hashing algorithm ever
- cpach 12y agoThat’s hilarious! :D