Correct way of creating salted hash password
问题 I am new to storing passwords on databases and from what I read I have created a simple php script below <?php $salt = openssl_random_pseudo_bytes (16); $password = "test"; $hash = hash ("sha512" , $salt . $password); echo $hash; ?> Am I doing this correctly? Should the salt be stored in databases as byte datatype? Should the final hash be stored at String datatype in database? 回答1: The SHA* algorithms are not appropriate to hash passwords, because they are ways too fast, and therefore can be