RE: How to hash password correctly in PHP? 01-31-2018, 08:40 PM
#30
(01-31-2018, 05:43 PM)PhucedMODZ Wrote: this is how my passwords are encrypted
$unhashedPassword = "test";
$hashedPassword = password_hash($unhashedPassword, PASSWORD_BCRYPT);
$user->update("users", array("password"=>self::sanitize($hashedPassword), "id", $_SESSION['id']);
Make sure to tick the "Disable Smilies" checkbox next time or just use code tags for your code since it kinda sucks if it replaces some parts of your code with smilies.
I'd recommend using a salt for your passwords, just to make it a littlebit more secure. It's not really required but helps if you want to do it as secure as possible.