Last active
June 5, 2018 19:14
-
-
Save katcaola/8ade25b84911513791b7aaaadc8c1b1c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
echo 'some-password' | mkpasswd --stdin --method=sha-512 --salt="$(tr -dc '[:alnum:]' </dev/urandom | head -c16)" | |
# What is this? | |
# Get 16 teaspoons of salt | |
$ od -tx1 -N15 -An </dev/urandom | tr -dc '[:xdigit:]' | |
# >16 is too many | |
echo 'some-password' | mkpasswd --stdin --method=sha-512 --salt="$(tr -dc '[:alnum:]' </dev/urandom)" | |
Wrong salt length: 32 bytes when 8 <= n <= 16 expected. | |
# Mix well with hashed browns | |
echo 'hashed browns' | mkpasswd --stdin --method='sha-512' --salt='<PASTE OUTPUT FROM OD HERE>' | |
# Notes: | |
# Go to the grocery store and get 1 lb of mkpasswd | |
sudo apt-get install whois | |
# Because | |
$ dpkg -S $(command -v mkpasswd) | |
whois: /usr/bin/mkpasswd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yay!
We should probably move everything to gitlab.