Understand how bcrypt hashes work — see the salt, cost factor, and hash structure. Demonstrates how the work factor (cost) exponentially increases compute time. Educational — the displayed hash is structurally correct but NOT a real bcrypt output.
Used only to demonstrate the work factor
Exponential: 2^cost key iterations
2b = current; 2a = legacy; 2y = PHP/Crypt
$2b — version identifier10 — cost factor (work)22 chars — 128-bit salt (base64)31 chars — 184-bit hash outputTimes are extrapolated from the measured cost-10 run. Each cost increment roughly doubles the work. Adjust the slider and watch the measured time change.
Educational tool — not a real bcrypt implementation
The salt is real (16 bytes from crypto.getRandomValues). The hash portion is a placeholder for visualization — real bcrypt uses the Eksblowfish cipher, which is too large to bundle here. To hash real passwords in production, use the bcrypt npm package or OS-provided crypt().
Every hash gets a unique random salt, so identical passwords produce different hashes.
The cost factor lets you make hashing deliberately slow, blunting brute-force GPU attacks.
The cost is stored in the hash, so you can rehash at a higher cost next login without forcing a reset.