Hash and verify Bcrypt password hashes entirely in your browser: choose a cost factor (rounds), generate a standard 60-character salted hash, and check plaintext against a stored hash. No data is uploaded.
Bcrypt 哈希串结构:$2b$10$salt_hash,其中 $2b$ 为算法版本、10 为成本因子(cost factor,指数级决定计算量,10≈150ms、12≈600ms)、其后 22 字符为随机盐、最后 31 字符为派生哈希。校验时无需单独保存盐,盐已内嵌在哈希串中随密文一同存储;口令比对采用恒定时间比较,防止时序侧信道攻击。
💡 Bcrypt 内置盐值(salt),相同明文每次生成结果不同;校验时自动从哈希中提取盐。bcryptjs 库由本站提供,计算完全在本地。
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Cost factor | iterations = 2^cost, doubling with each increment | Provos & Mazieres (1999) |
| Embedded salt | the output string carries version, cost, salt and hash | Provos & Mazieres (1999) |
| Length limit | only the first 72 bytes are used; pre-hash longer inputs | Provos & Mazieres (1999) |