reenadak icon

salt generator

reenadak | PRO | 02/20/18 07:02:00 PM UTC | 0 ⭐ | 341 👁️ | Never ⏰ | []
PHP |

380 B

|

None

|

0 👍

/

0 👎

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

Comments