bcrypt-strong-password-hasher
v1.1.0
Published
A secure, zero-dependency password hasher using native Node.js crypto
Downloads
17
Maintainers
Readme
bcrypt-strong-password-hasher
A secure, zero-dependency password hashing library using native Node.js crypto.
Features
- PBKDF2-HMAC-SHA512 hashing
- Auto salt generation
- Optional pepper support
- Configurable iterations and key length
- Timing-safe comparison
- Async/Promise API
- JSON metadata output for easy storage
Usage
import { hashPassword, verifyPassword } from 'bcrypt-strong-password-hasher';
const pepper = process.env.APP_SECRET || '';
const hashed = await hashPassword('admin123', { pepper });
const isValid = await verifyPassword('admin123', hashed, pepper);Running Tests
npm testLicense
MIT
