123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/bin/bash
- echo -n "Enter your salt (won't be displayed): "
- read -s SALT
- echo -en "\n"
- echo -n "Enter your string: "
- read STRING
- PASSWORD=$(echo -n "$SALT$STRING" | sha512sum | base64 -w 0)
- echo -n "Your password is: "
- echo -e "\033[0;30m${PASSWORD:0:32}\033[0m"
- exit 0;
|