https://github.com/stuelten/pwgen
Creates passwords which are easy enough to be remembered (or transferred via audio/telephone) while being secure enough for usage.
https://github.com/stuelten/pwgen
cpp cpp17 golang graal-native graalvm graalvm-native-image java password password-generator python quarkus rust-lang typescript
Last synced: 3 months ago
JSON representation
Creates passwords which are easy enough to be remembered (or transferred via audio/telephone) while being secure enough for usage.
- Host: GitHub
- URL: https://github.com/stuelten/pwgen
- Owner: stuelten
- Created: 2025-08-04T15:03:03.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-10-29T12:07:09.000Z (9 months ago)
- Last Synced: 2025-10-29T12:08:40.837Z (9 months ago)
- Topics: cpp, cpp17, golang, graal-native, graalvm, graalvm-native-image, java, password, password-generator, python, quarkus, rust-lang, typescript
- Language: Shell
- Homepage:
- Size: 15.3 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pwgen Project
Creates passwords
which are easy enough to be remembered
(or transferred via audio/telephone)
while being secure enough for usage.
The base idea is stolen from xkcd.com: https://preshing.com/20110811/xkcd-password-generator/.
The implementation is available in multiple languages:
- Bash
- C++
- Go
- Java
- Python
- Rust
- TypeScript
This way we are able to make some simple comparisons for the different implementations.
The performance of the different implementations must be taken with a grain of salt:
No implementation is optimized for speed.
## Command Line Options
All implemented applications support the following command line options:
```
Usage: pwgen-* [-hUvV] [-L=] [] [] []
[] Number of words to combine.
[] Generate this number of digits.
[] Delimiters to use between words
-h, --help Show this help message and exit.
-L, --lang= Language to use, e.g. 'de' or 'en'
-U, --wordsStartWithUppercase
Set first character of each word to uppercase
-v, --verbose be verbose.
-V, --version Print version information and exit.
```
### Example Usages
```shell script
# Generate a password with 4 words, default number of digits, and delimiters in the default locale
./pwgen-cpp/pwgen-cpp 4
# Generate a password with 4 words, a number with 6 digits, and default delimiters in the default locale
./pwgen-rust/pwgen-rust 4 6
# Generate a password with 3 words, 5 digits, and custom delimiters
./pwgen-go/pwgen-go 3 5 "!@#"
# Generate a password with 4 words, with the first character of each word uppercased
./pwgen-java/pwgen-java -U 4
# Generate a password with 4 words, default number of digits, and delimiters
# in the german locale
# using the uberjar
java -jar pwgen-java/target/pwgen-java-1-runner.jar -L de -U 4
```
# Source of wordlists
The German wordlist was collected manually.
https://github.com/bitcoin/bips/blob/master/bip-0039 contains french and english wordlists.