完全在浏览器中,用 bcrypt 哈希密码,并对照 bcrypt 哈希验证密码。
如何使用 Bcrypt
选择哈希以创建哈希,或选择验证以核对哈希。
输入密码,验证时还需输入哈希。
查看 bcrypt 哈希或匹配结果。
A bcrypt tool that hashes a password at a cost you choose, and verifies a password against an existing bcrypt hash. Everything runs locally in your browser, so passwords stay on your device.
Bcrypt is an adaptive password-hashing function designed specifically for storing passwords. Unlike a fast hash such as SHA-256, it is deliberately slow and includes a built-in salt, which is exactly what you want when defending stored passwords.
The cost factor (the rounds) sets how much work each hash takes. Every extra round doubles the computation, so raising the cost makes large-scale brute-force and GPU attacks far slower, while a single login stays fast enough. A value of 10 to 12 is a common choice.
Bcrypt mixes a random salt into every hash, so the same password produces a different hash each time. That defeats precomputed rainbow tables, and verification still works because the salt is stored inside the hash itself.
To check a password, the verify mode reads the salt and cost out of the stored hash, hashes the candidate the same way, and compares, which is why you only need the hash and the password, not the original salt.
Hashing and verifying run entirely in your browser, so nothing is uploaded. Even so, avoid pasting real production passwords on a shared computer.
常见问题
成本因子:每增加一轮就使计算哈希所需的工作量翻倍,从而减慢暴力破解。10 到 12 是常见选择。
bcrypt 在每个哈希中包含一个随机盐,因此即使是同一密码,输出也不同。验证仍然有效,因为盐存储在哈希内部。
哈希完全在你的浏览器中运行,因此密码不会被上传。不过,请避免在共用电脑上粘贴真实的生产密码。
嵌入此工具
将此工具添加到你自己的网站。复制下方代码片段即可,它会自动保持最新。
<iframe src="https://monu.tools/embed/zh/bcrypt-generator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>相关工具