@systemix/password
A cryptographically secure password generator with customizable complexity and entropy tools.
Installation
ts
pnpm add @systemix/password
Basic Usage
ts
import { generatePassword } from '@systemix/password'; const password = generatePassword(); // Default: 12 chars, lowercase + uppercase + numbers
Options
| Property | Type | Default | Description |
|---|---|---|---|
length | number | 12 | Password length (1–100) |
useNumbers | boolean | true | Include 0–9 |
useUppercase | boolean | true | Include A–Z |
useLowercase | boolean | true | Include a–z |
useSymbols | boolean | false | Include special characters |
minNumbers | number | 0 | Minimum numbers required |
minUppercase | number | 0 | Minimum uppercase required |
minLowercase | number | 0 | Minimum lowercase required |
minSymbols | number | 0 | Minimum symbols required |
excludeSimilarCharacters | boolean | false | Exclude visually similar chars |
count | number | 1 | Number of passwords to generate |
Examples
Strong password with symbols
ts
const password = generatePassword({ length: 16, useSymbols: true, minNumbers: 2, minSymbols: 2, });
Entropy calculation
ts
import { calculatePasswordEntropy } from '@systemix/password'; const entropy = calculatePasswordEntropy(16, 94); // length, charset size console.log(`Entropy: ${entropy.toFixed(1)} bits`);
Try it
Open the Password Generator demo to experiment interactively.