Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- - Salt Generator
- - Generates salt which can be added to an encrypted password to make it harder to
- decrypt. You will need to store the salt in a column in the user's row on the
- database for when you check the password is correct when the user logs in again.
- */
- public function generateSalt() {
- $salt = hash("sha1", rand() . rand() . rand());
- return $salt;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement