Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


How to hash password correctly in PHP? filter_list
Author
Message
RE: How to hash password correctly in PHP? #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.

Reply





Messages In This Thread
How to hash password correctly in PHP? - by Sikom - 05-29-2017, 10:10 PM
RE: How to hash password correctly in PHP? - by chunky - 01-31-2018, 08:40 PM



Users browsing this thread: 8 Guest(s)