1755653155
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
#!/bin/bash
|
||||
# usage: randomtoken [bytes] [mode]
|
||||
# modes: hex, md5, sha1, sha256, sha512, base64, raw
|
||||
# Example randomtoken 32 hex
|
||||
# requires xxd
|
||||
|
||||
# handle args and defaults
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 [bytes] [mode]"
|
||||
echo "Modes: hex, md5, sha1, sha256, sha512, base64, raw"
|
||||
echo "Example: $0 32 hex"
|
||||
exit 1
|
||||
else
|
||||
bytes=$1
|
||||
|
||||
Reference in New Issue
Block a user