Created
August 9, 2013 19:05
-
-
Save Natetronn/6196244 to your computer and use it in GitHub Desktop.
Generate SHA1 hashes for passwords (don't leave this lying around on your live server of course!)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $passwords = array( | |
| 'somepassword', | |
| 'anotherpassword', | |
| 'onemorepassword' | |
| // so on and so forth (don't forget the trailing commas) | |
| ); | |
| // convert passwords to SHA1 hashes | |
| foreach ($passwords as $password) { | |
| echo hash('sha1', $password)."<br>"; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment