PHP salt and hash SHA256 for login password
问题 I've made encrypting of the password in my register script and they are stored in the database, and I have to use them to login, so I would want to use the unencrypted ones to login. I've read some of the threads in here but nothing is helping me. How can I add it in my login.php? The salt is also stored in the database. This is my register.php script for encrypting $hash = hash('sha256', $password1); function createSalt() { $text = md5(uniqid(rand(), TRUE)); return substr($text, 0, 3); }