Skip to content

Instantly share code, notes, and snippets.

@raykrueger
Created May 5, 2011 15:59
Show Gist options
  • Save raykrueger/957311 to your computer and use it in GitHub Desktop.
Save raykrueger/957311 to your computer and use it in GitHub Desktop.
Generating secure repeatable passwords with OpenSSL
#!/bin/bash
# see http://www.openssl.org/docs/apps/passwd.html
DOMAIN=$1
PEPPER=55e730a3
SALT=`echo ${PEPPER}${DOMAIN} | shasum | cut -c 1-8`
openssl passwd -1 -salt $SALT | cut -d '$' -f 4
@raykrueger
Copy link
Author

With version 7f63f1 I switched to combining the domain with a fixed PEPPER value.

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