I'm trying to improve my login system and make it more secure.
$hashed_pass = password_hash($pass, PASSWORD_BCRYPT);
Is this function the best way to safely store password and other information in the database?
I'm trying to improve my login system and make it more secure.
$hashed_pass = password_hash($pass, PASSWORD_BCRYPT);
Is this function the best way to safely store password and other information in the database?
Is this function the best way to safely store password and other information in the database?
Yes it is safe to use. However, if you're looking for something even more powerful and your server supports it, you can use Argon2.
Reference links are:
However, using a custom salt has been deprecated in PHP 7.0.0
Warning The salt option has been deprecated as of PHP 7.0.0. It is now preferred to simply use the salt that is generated by default.