Should I add salt from a custom randomly generated method to my hashed password? PHP
问题 I am creating a log in system with database and wanted to ask about hashing passwords. I currently use the function password_hash() in PHP and in addition I add a custom random string of 20 characters. Looks something like this: $salt = generateRandomString(); $hashedPwd = password_hash($pwd + $salt, PASSWORD_DEFAULT); And the function: function generateRandomString($length = 20) { $characters='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+{}|[]/?~`';