Quick Start: Generate Hash
- Visit HeronTool's Hash Generator (哈希计算) tool.
- Paste text or file content (drag-and-drop supported) in the input box.
- Choose a hash algorithm: MD5, SHA-1, SHA-256, etc. (SHA-256 is recommended for security).
- Click “Generate” and the result will appear instantly, with one-click copy.
Secure Password Storage: Use Bcrypt
For user passwords, never use simple hashes like MD5. Instead, use Bcrypt Hash Generator (Bcrypt 哈希生成与验证):
- Enter the plaintext password and set the cost factor (default 10; higher is slower but more secure).
- Click generate to get a hash like
$2b$10$.... - To verify, paste the password and the hash into the verify area and click “Verify”; the result will show match or not.
Verify Integrity: HMAC Message Authentication Code
When you need to verify that a message hasn't been tampered with and confirm the sender's identity, use HMAC Generator (HMAC 消息认证码):
- Enter the message and your secret key.
- Choose a hash algorithm (e.g., SHA-256).
- Generate the HMAC value, and share the key with the other party; they can verify using the same parameters.
FAQ
Q: Why is MD5 insecure?
A: MD5 has collision vulnerabilities, allowing different content to produce the same hash; avoid it for security-sensitive use.
Q: Why does Bcrypt generate different hashes each time?
A: Bcrypt automatically adds a random salt, so the same password produces different hashes, but verification still works.
Q: What's the difference between HMAC and plain hash?
A: HMAC uses a secret key, verifying both integrity and source; plain hash has no key and only protects against accidental corruption.
Q: How to choose a hash algorithm?
A: Use SHA-256 for general integrity checks, Bcrypt for password storage, and HMAC-SHA256 for authentication.