diff options
author | Mike Crute <mike@crute.us> | 2019-03-28 21:22:12 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2019-03-28 21:25:02 -0700 |
commit | 97f28e513a7d4f0ade6a57acbede1125169614dc (patch) | |
tree | 4b8a0b6232b86e6e09ad3ac27969d4cf4895133a /bin | |
parent | d2c89014fcb19165b227d4e452a8a61cb681f58c (diff) | |
download | dotfiles-97f28e513a7d4f0ade6a57acbede1125169614dc.tar.bz2 dotfiles-97f28e513a7d4f0ade6a57acbede1125169614dc.tar.xz dotfiles-97f28e513a7d4f0ade6a57acbede1125169614dc.zip |
More portable password algorithm
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/secure-passwd.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/secure-passwd.sh b/bin/secure-passwd.sh index ec2bc6e..25a4ef1 100755 --- a/bin/secure-passwd.sh +++ b/bin/secure-passwd.sh | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | pass=$(head -c 500 /dev/urandom | tr -dc '[:alnum:]' | head -c 26) | 3 | pass=$(dd if=/dev/urandom count=1 bs=32 2>&1 | base64 | tr -dc '[:alnum:]' | cut -b -26) |
4 | if [ "$1" = "-n" ]; then | 4 | if [ "$1" = "-n" ]; then |
5 | echo -n $pass | 5 | echo -n $pass |
6 | else | 6 | else |