crypto-secretbox-key - randomly generate a secret key
crypto-secretbox-key secretkeyfile
Randomly generates a secret key to be used by crypto-secretbox(1) and crypto-secretbox-open(1).
The secret key will be written to the file secretkeyfile
Normally, crypto-secretbox-key exits with 0.
If invalid arguments are given, crypto-secretbox-key exits with 100.
If either secretkeyfile already exists, or if it refers to an invalid filesystem path, then crypto-secretbox-key exits with 111.
This program simply reads random bytes from /dev/urandom to generate a secret key. The number of bytes is equal to the value of crypto_secretbox_KEYBYTES provided by NaCl, the Networking and Cryptography library by Daniel J. Bernstein and Tanja Lange. See the official website http://nacl.cr.yp.to/ for details.
Jay Sullivan <jay@identity.pub>