Created
December 4, 2014 05:35
-
-
Save ianmariano/4174c51bb161ef9546b8 to your computer and use it in GitHub Desktop.
generate a base-64 encoded sha-256 password hash with openssl on the command line
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
# generate an SHA-256 password hash base64 encoded | |
echo -n "password" | openssl dgst -sha256 -binary | openssl base64 | |
# better yet, use pepper (suffix the password with the pepper) | |
echo -n "passwordpepper" | openssl dgst -sha256 -binary | openssl base64 | |
# better yet, use salt (prefix the password with the salt) | |
echo -n "saltpassword" | openssl dgst -sha256 -binary | openssl base64 |
amFmTUFCRGNDb3MyRXEwZkR2V1JLTkZyL0daVUxoMERmODBuQm1CaXNXND0__
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!