/* - 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; }