DevToolBayFree Developer Tools

SHA 哈希生成器

SHA-1/256/384/512 在线计算:HMAC-SHA-256、文本与文件输入、WebCrypto 兜底纯 JS 实现(file:// 也可用)。

UPPERCASE hex
Separator
HMAC key (optional, HMAC-SHA256)

Notes

Hashes are one-way: the same input always yields the same digest, and no two different inputs should ever share one (finding a collision is cryptographically infeasible for SHA-256). When you enter an HMAC key, the tool computes HMAC-SHA-256 only — message authentication, not encryption. The WebCrypto path is used on secure contexts (https, localhost); elsewhere a self-contained pure-JS SHA-256 implementation produces identical results. Everything runs in this tab.

如何使用SHA 哈希生成器

输入或粘贴文本(也支持文件),SHA-256 摘要即时本地计算,同时给出 hex 与 Base64 两种形式。把厂商页面发布的校验和与这里的输出对一眼——两串一致,文件就是逐位完整的。

哈希跑在原生 crypto 引擎上,速度与输出与 Node、openssl 对同一字节流的结果一致。也要记住哈希不是什么:它不是加密,更不是密码存储——凭据请用 bcrypt、Argon2 这类专门 KDF,而不是裸 SHA-256 摘要。

相关工具