跳到主要内容
Z

What is Hash function?

A hash function maps input data of any size to a fixed-size string of bytes (the hash or digest). The same input always produces the same output, small input changes produce very different outputs, and the process is one-way — you cannot reverse a hash back to its input.

Good cryptographic hashes are deterministic, one-way, and collision-resistant (it is infeasible to find two inputs with the same hash). Examples include MD5 and SHA-1 (now broken for security) and SHA-256 (the modern standard).

Hashes are used for file-integrity checks, digital signatures, deduplication and — with a salt and a slow KDF like bcrypt or argon2 — password storage.

Hash function tools

常见问题

SHA-1 现在还安全吗?

不安全——SHA-1 已经出现了实际可行的碰撞攻击(SHAttered,2017 年)。请不要将 SHA-1 用于数字签名或任何防篡改场景,建议改用 SHA-256。

为什么现在还有人在用 SHA-1?

主要是出于向后兼容的考虑——Git 用它来生成对象 ID(并配有碰撞检测补丁),一些较早的 TLS 系统以及历史遗留的文件校验也仍在使用它。

这个工具支持离线使用吗?

支持——页面加载完成后,哈希计算完全在你的浏览器本地进行。