Skip to content

Instantly share code, notes, and snippets.

@Xerkus
Last active March 17, 2019 05:23
Show Gist options
  • Save Xerkus/3111262 to your computer and use it in GitHub Desktop.
Save Xerkus/3111262 to your computer and use it in GitHub Desktop.
password generation command and shell script for creating hash based deterministic passwords from master password and string, eg: `passgen string 16`
head -c 500 /dev/urandom | tr -dc a-z0-9 | head -c 32; echo
#!/bin/bash
read -s -p "Enter master password: " pass
echo
echo "Password for '$1'(${2:-32} chars) is: "
echo $1:$pass | sha512sum | base64 | head -c ${2:-32}
echo
unset pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment