2015-06-01 00:41:02 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
2015-06-01 20:31:30 -05:00
|
|
|
shaStatic(){
|
2015-06-01 00:41:02 -05:00
|
|
|
#hashes date with SHA
|
2015-06-01 20:31:30 -05:00
|
|
|
local charSize=20
|
|
|
|
echo
|
|
|
|
echo "${charSize} character password generated using SHA256 with date"
|
|
|
|
echo "***************************************************"
|
|
|
|
date +%s | sha256sum | base64 | head -c ${charSize} ; echo
|
|
|
|
echo "***************************************************"
|
|
|
|
}
|
|
|
|
|
|
|
|
shaWithNum(){
|
|
|
|
#hashes date with SHA
|
|
|
|
echo
|
|
|
|
echo "$1 character password generated using SHA256 with date"
|
|
|
|
echo "***************************************************"
|
|
|
|
date +%s | sha256sum | base64 | head -c $1 ; echo
|
|
|
|
echo "***************************************************"
|
2015-06-01 00:41:02 -05:00
|
|
|
}
|
|
|
|
|
2015-06-01 20:31:30 -05:00
|
|
|
leftHand(){
|
2015-06-01 00:41:02 -05:00
|
|
|
echo
|
2015-06-01 20:31:30 -05:00
|
|
|
echo "8 character password easy to type with left hand"
|
2015-06-01 00:41:02 -05:00
|
|
|
echo "**************************************************"
|
2015-06-01 20:31:30 -05:00
|
|
|
</dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c8; echo ""
|
2015-06-01 00:41:02 -05:00
|
|
|
echo "**************************************************"
|
|
|
|
}
|
|
|
|
|
2015-06-01 20:31:30 -05:00
|
|
|
leftHandNum(){
|
2015-06-01 00:41:02 -05:00
|
|
|
echo
|
2015-06-01 20:31:30 -05:00
|
|
|
echo "$1 character password easy to type with left hand"
|
2015-06-01 00:41:02 -05:00
|
|
|
echo "**************************************************"
|
2015-06-01 20:31:30 -05:00
|
|
|
</dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c$1; echo ""
|
2015-06-01 00:41:02 -05:00
|
|
|
echo "**************************************************"
|
|
|
|
}
|