4.0.1 • Published 4 months ago
secure-keyz v4.0.1
🔐 Secure-KeyZ
A powerful, flexible PassKey generation tool designed for security-conscious users
Features
- Strong Security: Generate cryptographically secure passwords with high entropy
- Flexible Options: Customize PassKey length, character sets, and complexity
- Memorability Features: Create passwords that are both secure and easy to remember
- Security Analysis: Evaluate existing passwords on strength and composition
- Modern CLI: Beautiful command-line interface with colorful outputs
- TypeScript Support: Full TypeScript interface and documentation
Installation
# Install globally
npm install -g secure-keyz
# Or install locally
npm install secure-keyz
Quick Start
# Generate a default secure PassKey
secure-keyz
# Generate a memorable 20-character PassKey
secure-keyz --length 20 --memorable
# Analyze an existing password
secure-keyz --analyze "MyCurrentPassword123!"
CLI Usage
# Show help information
secure-keyz --help
Options
Option | Alias | Description | Default |
---|---|---|---|
--length <number> | -l | PassKey length | 16 |
--no-numbers | -n | Exclude numerical characters | (numbers included) |
--no-special | -s | Exclude special characters | (specials included) |
--no-emojis | -e | Exclude emoji decorations | (emojis included) |
--memorable | -m | Generate memorable PassKey | false |
--custom <chars> | -c | Add custom character set | "" |
--no-similar | Exclude similar-looking characters | (similar excluded) | |
--analyze <passkey> | -a | Analyze passkey strength | |
--validate <passkey> | -v | Validate passkey against min strength | |
--min-strength <number> | Minimum strength for validation | 3 |
Programmatic Usage
Basic Password Generation
import { PassKeyGenerator } from 'secure-keyz';
// Generate default PassKey
const passKey = PassKeyGenerator.generatePassKey();
console.log(passKey); // Example: "j5K@pT8!F2xB&r0D🔒"
// Custom PassKey generation
const customPassKey = PassKeyGenerator.generatePassKey({
length: 24,
includeNumbers: false,
memorable: true
});
console.log(customPassKey); // Example: "xPwKeHgJvZqByTmRfNhS-dragon"
Password Analysis
import { PassKeyGenerator } from 'secure-keyz';
// Analyze a password's strength and characteristics
const analysis = PassKeyGenerator.analyzePassKey("MySecurePassw0rd!");
console.log(analysis);
/*
{
length: 16,
complexity: 'strong',
entropyBits: 73.76,
containsEmoji: false,
specialCharCount: 1
}
*/
// Validate if a password meets minimum requirements
const isValid = PassKeyGenerator.validatePassKey("WeakPw", 3);
console.log(isValid); // false - doesn't meet 'strong' requirement
Configuration Options
The PassKeyOptions
interface gives you full control over password generation:
Option | Type | Default | Description |
---|---|---|---|
length | number | 16 | Length of generated PassKey (8-64) |
includeNumbers | boolean | true | Include digits 2-9 |
includeSpecialChars | boolean | true | Include special symbols |
includeEmojis | boolean | true | Add a decorative emoji |
excludeSimilarChars | boolean | true | Remove confusing chars like l/1/O/0 |
customCharSet | string | "" | Add additional custom characters |
memorable | boolean | false | Create human-friendly passwords |
Security Features
- Uses Node.js crypto module for secure randomness
- Removes visually confusing characters by default
- Complexity rating system (weak, medium, strong, excellent)
- Entropy calculation for quantitative security measurement
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the ISC License - see the LICENSE file for details.