LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mcookie

generate a 128-bit random hexadecimal number

TLDR

Generate a 128-bit random hexadecimal number
$ mcookie
copy
Use a file as an additional entropy source
$ mcookie --file [path/to/file]
copy
Read at most a specific number of bytes from file as seed
$ mcookie --file [path/to/file] --max-size [512]
copy
Show verbose details about randomness sources
$ mcookie --verbose
copy
Display version information
$ mcookie --version
copy

SYNOPSIS

mcookie [options]

DESCRIPTION

mcookie generates a 128-bit random hexadecimal number (32 hex characters). It is primarily used for generating X authority cookies but can be used for any purpose requiring random data.

PARAMETERS

-f, --file FILE

Use file contents as additional entropy source
-m, --max-size BYTES
Maximum bytes to read from file
-v, --verbose
Print details about randomness sources
-V, --version
Display version information and exit
-h, --help
Display help text and exit

OUTPUT

32 hexadecimal characters (128 bits of randomness), printed to standard output with a trailing newline.

INSTALL

sudo apt install util-linux
copy
sudo dnf install util-linux
copy
sudo pacman -S util-linux
copy
sudo apk add mcookie
copy
sudo zypper install util-linux
copy
brew install util-linux
copy
nix profile install nixpkgs#util-linux
copy

CAVEATS

Uses /dev/urandom as its primary entropy source. Part of the util-linux package. The output is not cryptographically audited; for cryptographic key generation, prefer openssl or gpg.

SEE ALSO

xauth(1), uuidgen(1), openssl(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid