Cryptographically secure password generator for human-readable application passwords.
A lightweight Java password generator that creates secure, memorable passwords in hyphen-separated format. Perfect for application-specific passwords in OAuth 2.0 environments, IMAP/SMTP authentication, or any scenario requiring user-friendly credentials.
Example outputs: abcd-efgh-ijkl, abc-def-ghi-jklm, qwerty-asdf-zxcv
- Point and shoot: No parameters, no mistakes, no weak passwords
- Cryptographically secure: Uses Java's
SecureRandomfor true randomness - Human-readable: Hyphen-separated lowercase letters (easy to type and communicate)
- Strong security: 68-90 bits of entropy, exceeding NIST recommendations (64+ bits)
- No predictable patterns: Truly random character selection
- Uniform distribution: All characters equally likely
- Consistent length: 15-20 total characters including hyphens
- Generation time: sub-millisecond per password
| Property | Value |
|---|---|
| Character set | Lowercase a-z (26 chars) |
| Groups | 3 or 4 (random) |
| Characters per group | 3-4 (4 groups) or 4-6 (3 groups) (random) |
| Total length | 15-20 characters (including hyphens) |
| Character count | 13-18 letters (random) |
| Entropy | 68-90 bits |
- Minimum entropy: 68 bits (13 characters)
- Maximum entropy: 90 bits (18 characters)
- Brute force resistance: ~9.4 million years at 1 billion attempts/second (minimum case)
- Quantum-resistant: 45 bits effective security against Grover's algorithm
The hyphen-separated format sacrifices ~10 bits of potential entropy for significant usability benefits while maintaining excellent security for application passwords.
- Application-specific passwords for OAuth 2.0 environments
- IMAP/SMTP, Wi-Fi, VPN authentication credentials
- API access tokens in human-readable format
- Temporary access codes/passwords
- Server/app generated passwords
Add the JAR to your classpath (e.g., ~/java-x86_64_sdk/jre/lib/ext/):
import PasswordGenerator;
...
String password = PasswordGenerator.generatePassword();
System.out.println(password); // abc-defg-hijk-lmn
...Download the latest simple-password-generator.jar from Releases.
# Generate a single password (using -jar)
java -jar simple-password-generator.jar
# Generate 5 passwords
java -jar simple-password-generator.jar 5
# Alternative: using -cp
java -cp simple-password-generator.jar PasswordGenerator 5[user@MacBook ~]% java -jar simple-password-generator.jar 3
cfso-jiu-qui-bvgc
vlb-sks-zyac-ljw
bsged-yabjf-ofxkpp# Clone the repository
git clone https://github.com/dutty5/simple-password-generator.git
cd simple-password-generator
# Build manually
javac PasswordGenerator.java
jar cfe simple-password-generator.jar PasswordGenerator PasswordGenerator.class
# Test
java -jar simple-password-generator.jarMIT License - see LICENSE file for details