Created
November 15, 2011 11:05
-
-
Save snaewe/1366812 to your computer and use it in GitHub Desktop.
Hashapass command line tool
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
#!/bin/bash | |
#hashapass.com method for generating passwords | |
#script by Simon Elmir | |
export IFS="" #read will now preserve whitespace | |
read -rp "parameter: " PARAMETER | |
read -rsp "password: " PASSWORD | |
echo | |
echo -n "$PARAMETER" \ | |
| openssl dgst -sha1 -binary -hmac "$PASSWORD" \ | |
| openssl enc -base64 \ | |
| cut -c 1-8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment