Skip to content

Instantly share code, notes, and snippets.

@snaewe
Created November 15, 2011 11:05
Show Gist options
  • Save snaewe/1366812 to your computer and use it in GitHub Desktop.
Save snaewe/1366812 to your computer and use it in GitHub Desktop.
Hashapass command line tool
#!/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