Skip to content

Instantly share code, notes, and snippets.

@ianmariano
Created December 4, 2014 05:35
Show Gist options
  • Save ianmariano/4174c51bb161ef9546b8 to your computer and use it in GitHub Desktop.
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
# 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
@badr44deen
Copy link

amFmTUFCRGNDb3MyRXEwZkR2V1JLTkZyL0daVUxoMERmODBuQm1CaXNXND0__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment