Print random bytes from a secure source to stdout.
Usage: rand [<length-bytes>] [flags]
Print random bytes from a secure source to stdout.
Arguments:
[<length-bytes>] Length of random bytes to generate.
Flags:
-h, --help Show context-sensitive help.
-s, --seed=STRING Use an insecure random source with seed integer.
-a, --base64 Print random bytes encoded as base64.
-b, --binary Print random bytes directly without formatting.
-p, --password Print a suitable password.
-o, --omit=STRING Omit the listed characters from generated passwords.
-n, --omit-newline Do not print the trailing newline character.
-u, --uuid Print a random (v4) UUID.
$ rand 16
6548caf97a6c07132cf2eeeb2264270b
$ rand 32 --base64
kPRmfq/2UPzUk7YAXADZzSpN8K6Z8JwweXkewYxj5lw=
$ rand 8 --binary | xxd
00000000: 0da2 41b4 7c3f a06d ..A.|?.m
$ rand 8 --seed=123
f1405ced8b9968ba
$ rand 16 --seed=123
f1405ced8b9968baf9109259515bf702
$ rand 32 --seed=123
f1405ced8b9968baf9109259515bf7025a291b00ff7bfd6a4cdb51d40f4b367c