Hash 生成器Hash Generator
MD5/SHA1/SHA256/SHA512哈希生成Generate MD5/SHA1/SHA256/SHA512 hashes.
关于 Hash 生成器About Hash Generator
哈希算法把任意长度的文本压缩为固定长度的摘要,广泛用于文件校验、密码存储与签名。本工具在浏览器本地实时计算 MD5、SHA-1、SHA-256、SHA-512 等常见摘要,输入即出结果,无需上传数据。Hash algorithms compress arbitrary text into fixed-length digests, widely used for file verification, password storage and signatures. This tool computes MD5, SHA-1, SHA-256 and SHA-512 digests locally in real time — results appear as you type, with no data uploaded.
使用方法How to Use
- 在输入框中填写需要计算摘要的文本。Type the text to hash into the input box.
- 页面实时列出各算法的哈希结果。The page lists each algorithm’s digest in real time.
- 点击对应结果即可复制使用。Click a result to copy it.
常见问题FAQ
MD5 现在还安全吗?Is MD5 still safe?
不安全。MD5 碰撞已可被快速构造,只适合文件校验等非对抗场景;涉及密码、签名请至少使用 SHA-256。No. MD5 collisions can be constructed quickly; it only suits non-adversarial uses like file checksums. For passwords and signatures use at least SHA-256.
哈希值能反推出原文吗?Can a digest be reversed to the original?
不能。哈希是单向函数,只能对候选原文“试错”(暴力、彩虹表)。因此存储密码时还应加盐并使用慢哈希(如 bcrypt)。No. Hashes are one-way; originals can only be guessed (brute force, rainbow tables). That is why stored passwords should also be salted and hashed with slow algorithms like bcrypt.
同样的文本每次结果一样吗?Does the same text always give the same digest?
一样,哈希是确定性的;而输入哪怕只差一个字符,摘要也会完全不同(雪崩效应),这正是它能用于完整性校验的原因。Yes, hashes are deterministic; yet changing even one character produces a completely different digest (the avalanche effect) — exactly why they verify integrity.
MD5 还能用于文件完整性校验吗?Can MD5 still be used for file integrity checks?
可以用于非对抗场景(如下载完整性、缓存指纹),但不能用于安全校验或密码存储——MD5 与 SHA1 已被证实存在碰撞攻击。Yes for non-adversarial cases like download integrity or cache fingerprints, but not for security verification or password storage — MD5 and SHA1 have proven collision attacks.
哈希和加密有什么区别?What is the difference between hashing and encryption?
哈希是单向不可逆的,相同输入必得相同摘要;加密是可逆的。本工具只做哈希摘要,不适用于需要还原原始数据的场景。Hashing is one-way and irreversible — the same input always yields the same digest; encryption is reversible. This tool only computes digests and is not for data that must be recovered.
相关阅读Related Reading
MD5/SHA1/SHA256 怎么选:哈希碰撞、加盐与密码存储的正确姿势Choosing Between MD5, SHA1 and SHA256: Collisions, Salting and the Right Way to Store Passwords
哈希不是加密,MD5 也不是"过时了就不能用"——算法选型取决于场景。本文从碰撞攻击的真实数据出发,讲清通用哈希与密码哈希的本质区别,以及加盐、bcrypt、Argon2 各自的适用边界Hashing is not encryption, and MD5 is not "obsolete so never use it" — algorithm choice depends on the scenario. Starting from real collision-attack data, this article explains the fundamental difference between general-purpose hashes and password hashes, and where salting, bcrypt and Argon2 each fit.
UUID v4 与 v7 的区别:为什么分布式系统开始从随机 ID 切到时序 IDUUID v4 vs v7: Why Distributed Systems Are Moving from Random to Time-Ordered IDs
用了多年的 UUID v4 正在被 v7 取代,背后不是玄学,而是数据库索引与分布式排序的真实痛点。本文拆解 v4 的随机代价、v7 的时间戳结构,以及什么场景下该迁移、什么场景下继续用 v4After years of dominance, UUID v4 is being displaced by v7 — not by hype, but by real pain in database indexing and distributed ordering. This article breaks down the cost of randomness in v4, the timestamp-based structure of v7, and when to migrate versus when to stick with v4.