Created
June 12, 2014 12:02
-
-
Save jimmidyson/6027424bf27fabb6a0ec to your computer and use it in GitHub Desktop.
Generate SHA512 password hash from password with random salt
This file contains 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
SALT=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 18 | head -1` \ | |
python -c "import crypt, getpass, pwd, os; print crypt.crypt('password', '\$6\$' + os.environ['SALT'] + '\$')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment