bcrypt
Installation
SKILL.md
Bcrypt
Bcrypt is a password-hashing function designed to be slow, protecting against brute-force attacks. It incorporates a salt to protect against rainbow table attacks.
When to Use
- User Password Hashing: Hashing user passwords securely before storing them in database tables.
- Authentication Verification: Verifying incoming plaintext passwords against hashed records during login attempts.
- Legacy Credential Protection: Maintaining established authentication backends using the proven, battle-tested bcrypt algorithm.
- Adaptive Cost Factor Tuning: Adjusting computational work factors over time to counter advances in hardware cracking performance.
Quick Start
import bcrypt from "bcrypt";
const saltRounds = 10;
const myPlaintextPassword = "s0m3password";