mint_
Documentation menu
On this page

Generators / Documentation

Characters

Chars, passwords, passphrases and PINs.

These generators sample characters from a known alphabet. Every character is drawn with rejection sampling, so every symbol is equally likely.

chars#

Characters from a preset or a literal charset. The default is alnum with a length of 32.

mint chars [--charset <preset|list>] [--length <n>] [--require-each]
FlagEffect
--charset <preset|list>alnum, alpha, lower, upper, digits, hex, symbols, safe, url-safe, base58, or a literal character list
--exclude <chars>Remove these characters from the final charset
--require-eachInclude at least one character of every class (lowercase, uppercase, digit, symbol) present in the charset
--no-ambiguousRemove 0 O o 1 l I i from the charset
-l, --length <n>Output length in characters
--size <n>Alias for --length
-b, --bytes <n>Request entropy; the shortest matching character count is used
--bits <n>Request entropy in bits
--upperUppercase the result
--lowerLowercase the result

The safe preset removes the same look-alike characters as --no-ambiguous.

$ mint chars --charset safe --length 20
ybUvSvMEhFaMw9MmQYFA

$ mint chars --charset "abc123" --require-each --length 8
3a12cb1c

password#

A strong password with at least one lowercase, uppercase, digit and symbol. The default length is 20.

mint password [--length 20] [--no-ambiguous]
FlagEffect
--charset <preset|list>Use a custom base alphabet
--exclude <chars>Remove characters
--require-eachReserved by the character engine; passwords already guarantee every class
--no-ambiguousRemove 0 O o 1 l I i
-l, --length <n>Password length, minimum 4
--size <n>Alias for --length
-b, --bytes <n>Request entropy
--bits <n>Request entropy in bits
--upperUppercase the result
--lowerLowercase the result
--no-digitsRemove digits from the default alphabet
--no-symbolsRemove symbols from the default alphabet

When both digits and symbols are removed, the required classes shrink to the ones that remain. The password still guarantees one character from each available class.

$ mint password --length 20
+@<,+YXIt-;u,hL,8{%]

$ mint password --length 32 --no-ambiguous

passphrase#

A diceware-style passphrase from the bundled 2048-word list. Each word is 11 bits. The default is six words separated by -.

mint passphrase [--words 6] [--separator -] [--capitalize] [--number]
FlagEffect
--words <n>Number of words, 1 to 128
--separator <str>Separator between words, default -
--capitalizeCapitalize the first letter of each word
--numberAppend a random number from 0 to 99
-b, --bytes <n>Choose the shortest word count that reaches this entropy
--bits <n>Choose the shortest word count that reaches this bit target

--words cannot be combined with --bytes or --bits.

$ mint passphrase --words 4
shield-pave-carpet-program

$ mint passphrase --words 6 --capitalize --number

Six words carry 66 bits. Adding --number adds about 6.64 bits.

pin#

A numeric PIN with bias-free digit sampling. The default length is six and leading zeros are allowed.

mint pin [--length 6] [--no-leading-zero]
FlagEffect
-l, --length <n>Number of digits
--size <n>Alias for --length
-b, --bytes <n>Request entropy
--bits <n>Request entropy in bits
--exclude <chars>Remove digits from the alphabet
--no-leading-zeroFirst digit cannot be zero
$ mint pin --length 4
8007