5 releases (breaking)
new 0.5.0 | Mar 6, 2025 |
---|---|
0.4.0 | Feb 28, 2025 |
0.3.0 | Feb 28, 2025 |
0.2.2 | Feb 27, 2025 |
0.1.0 | Feb 26, 2025 |
#1304 in Command line utilities
478 downloads per month
37KB
882 lines
pwgen2
password generator
Default length is 18 characters, but can be changed with the first argument.
pwgen2 24
Password is generated using the following characters:
lowercase: "abcdefghijklmnopqrstuvwxyz",
uppercase: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
digits: "0123456789",
symbols: "!@#$%&.-_*",
Installation
cargo install pwgen2
Usage
Usage: pwgen2 [OPTIONS] [length] [number]
Arguments:
[length] password length [default: 18]
[number] Number of passwords to generate [default: 1]
Options:
-p, --pin Generate a pin
-a, --alphanumeric Generate an alphanumeric password
-b, --bcrypt Hash the generated password using Bcrypt
-k, --pbkdf2 Hash the generated password using PBKDF2
-s, --sha512 Hash the generated password using SHA512
-h, --help Print help
-V, --version Print version
Examples
Create a password with 24 characters:
pwgen2 24
Create a pin:
pwgen2 -p
Create an alphanumeric password:
pwgen2 -a
Create 5 passwords with 24 characters:
pwgen2 24 5
Create a password and hash it using Bcrypt:
pwgen2 -b
useful for generating passwords for htpasswd
Dependencies
~6–13MB
~147K SLoC