openssl base random password generator
- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bin | ||
| README.md | ||
mkpw
Generates random passwords, as a grid to pick from in a terminal or as a single one when piped.
Installation
tpm install mkpw
Usage
mkpw # 40 passwords of 30 characters, in a grid
mkpw 16 # 40 passwords of 16 characters
mkpw 16 10 # 10 passwords of 16 characters
mkpw 32 | xclip -sel c # a single password, no trailing newline
Notes
- Randomness comes from
openssl rand; the alphabet is URL-safe base64 (A-Z a-z 0-9 - _), so the passwords can be pasted anywhere without escaping. - When stdout is not a terminal, exactly one password is printed with no trailing newline, which makes piping into a clipboard or a config file straightforward.
- The grid width is computed for an 80-column terminal.