A lightweight, console-based password vault built entirely in pure Java that demonstrates real-world encryption using the Advanced Encryption Standard (AES-256). The tool encrypts stored credentials, generates cryptographically strong passwords, and evaluates password strength — all with zero external dependencies.
Perfect for students learning secure coding, cryptography fundamentals, and protecting sensitive data in AI/ML pipelines (e.g., API keys, dataset credentials).
| Feature | Description |
|---|---|
| AES-256 Encryption | All passwords encrypted before storage using Java Cryptography Architecture |
| Strong Password Generator | 8–20 characters, uppercase, lowercase, digits, special chars |
| Real-time Strength Meter | Scores 0–100 → Weak / Medium / Strong |
| List Saved Sites | Quick overview of stored accounts |
| Zero Dependencies | Runs on any machine with JDK 8+ |
| Clean Console Menu | User-friendly interface |
| Component | Technology |
|---|---|
| Language | Java (JDK 8+) |
| Encryption | Java Cryptography Extension (JCE) – AES |
| Randomization | java.security.SecureRandom |
| Storage | In-memory HashMap<String, String> |
| UI | Console (Scanner) |
private String encrypt(String data) throws Exception {
SecretKeySpec key = new SecretKeySpec(keyValue, "AES");
Cipher c = Cipher.getInstance("AES");
c.init(Cipher.ENCRYPT_MODE, key);
byte[] encVal = c.doFinal(data.getBytes());
return Base64.getEncoder().encodeToString(encVal);
}
public String generateStrongPassword(int length) {
String chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*_-";
StringBuilder pass = new StringBuilder();
for (int i = 0; i < length; i++) {
pass.append(chars.charAt(secureRandom.nextInt(chars.length())));
}
return pass.toString();
}
| Metric | Result |
|---|---|
| Encryption time | < 1 ms per password |
| Decryption time | < 1 ms |
| Memory usage | < 5 MB |
| Tested on | Windows / Linux / macOS (JDK 21) |
##Security Notes