Bcrypt 生成器
为认证系统生成带有可配置成本因子的安全 bcrypt 密码哈希。
Generate Hash
10
Higher = more secure but slower. 10-12 recommended.
Verify Password
About Bcrypt:
- • Bcrypt is a password hashing algorithm designed to be slow
- • The cost factor determines the number of iterations (2^cost)
- • Each hash includes a random salt, so the same password produces different hashes
- • Note: This is a demo implementation. Use bcryptjs in production.
Bcrypt 哈希 - 技术详情
Bcrypt 设计为慢速运算,使暴力攻击变得不切实际。成本因子(推荐 10-12)决定执行多少次迭代。每个哈希都包含一个随机盐值。
命令行替代方案
// Bcrypt hash format\n$2b$10$salt22chars.hash31characters\n\n$2b = algorithm\n$10 = cost (2^10 iterations)\nsalt = 22 char random salt