跳到主要内容
uencoder

哈希计算器

计算 MD5、SHA-1、SHA-256 或 SHA-512 哈希,支持十六进制或 Base64 输出。免费、隐私、100% 客户端运行。SHA-256/512 基于 Web Crypto API,MD5 基于 spark-md5,适用于校验和、完整性验证、指纹识别等场景。MD5 与 SHA-1 已不适用于安全场景。

尝试示例:
MD5 不适用于安全场景。Local only

最近历史

暂无历史

使用方法

  1. 在输入框中输入或粘贴文本。
  2. 选择哈希算法和输出格式。
  3. 复制计算出的摘要。

使用此工具的任务

比较 throughput of different hash algorithms
Measure 如何快 SHA-256, SHA-3, BLAKE2/3, 和 RIPEMD-160 hash given 输入到 选择右 algorithm 为你的吞吐量 budget.
任务
加密 a large file with AES in chunks
加密 files too large for a single AES operation by processing them in chunks with a streaming mode, then decrypt to recover.
任务
生成 an HMAC and verify a message's authenticity
计算 a keyed-hash (HMAC) of a message to prove it came from someone sharing the secret, then verify a received HMAC.
任务
生成 cryptographic nonces correctly
nonce (数字 used 一次) 必须是 唯一 per 加密在 相同键. Learn 当到 use random vs counter nonces 和 consequences 的 reuse.
任务
生成 a Certificate Signing Request (CSR)
CSR contains 你的公共键 和 identity 信息, sent 到 CA 到 obtain signed TLS certificate. Learn 需要 fields 和验证处理.
任务
生成 RSA key pair and inspect self-signed certificate fields
Create RSA 键对 为 testing, 和理解结构的 self-signed X.509 certificate 为本地 development.
任务
Handle 数据库 deadlocks
Deadlocks 发生当 transactions wait 开每个 other's locks. Learn 检测, 预防, 和重试 strategies.
任务
Hash password 和验证它 稍后无 storing plaintext
Use 慢 password-哈希函数 (bcrypt/PBKDF2/scrypt) 到存储 salted hash, 然后验证候选 password 针对它.
任务
Implement CORS 安全
CORS (Cross-源 Resource Sharing) allows controlled cross-源 requests. Learn 到 configure origins, 方法, headers, 和 credentials 安全.
任务
Implement Content Security Policy (CSP)
CSP restricts 什么 resources (scripts, styles, images) page 能够加载, preventing XSS 和数据 injection. Learn 策略 directives 和报告.
任务
Implement ECDSA signatures
ECDSA (Elliptic Curve Digital 签名 Algorithm) provides digital signatures 具有 smaller 关键 than RSA. Learn 签名和 验证.
任务
Implement HSTS (HTTP Strict Transport Security)
HSTS forces browsers 到总是 use HTTPS 为你的 site, preventing 协议 downgrade attacks 和 SSL stripping.
任务
Implement mutual TLS (mTLS) 认证
mTLS requires 两者客户端和 服务器到 存在 certificates, providing strong bidirectional 认证无 passwords. 常见在 服务-到-服务和 零-trust architectures.
任务
Implement 速率 limiting 到 prevent brute-force attacks
Rate limiting caps 数字的 requests per 时间 window, preventing brute-force, credential stuffing, 和 DoS attacks. Learn 令牌 bucket 和 sliding window algorithms.
任务
Install TLS certificate 开你的服务器
之后 receiving signed certificate 从 CA, install 它具有正确链接 order 和验证部署具有 TLS handshake.
任务
Prevent clickjacking attacks
Clickjacking embeds 你的 site 在不可见 iframe 和 tricks users 为 clicking. Learn X-帧-Options 和 CSP 帧-ancestors.
任务
Prevent CSRF (Cross-Site Request Forgery) attacks
CSRF tricks 已认证 users 为 submitting unwanted requests. Learn anti-CSRF tokens, SameSite cookies, 和 double-submit patterns.
任务
Prevent timing attacks 开 cryptographic 操作
Timing attacks exploit 执行时间 variations 到 leak secrets. Learn 常量-时间 comparison, 均匀过程, 和 blinding techniques.
任务
Rotate 加密关键安全
键 rotation limits blast 半径的 compromised 键. Learn 双-加密 migration 模式和 如何re-加密数据无 downtime.
任务
安全 wipe sensitive 数据从 内存
Cryptographic 关键和 plaintext 必须是 zeroed 从内存之后 use. Learn 为什么 memset 是不 enough 和如何prevent compiler 优化.
任务
Use Bloom filters 为集合 membership
Bloom filters probabilistically 测试集合 membership 具有否 假负 但可能假 正. Space-efficient 为大 sets.
任务
Use consistent 哈希为 分布
Consistent 哈希 distributes 关键 across servers 具有 minimal redistribution 当 servers 是 added 或 removed. Used 在 CDN 和 distributed caches.
任务
Use 常量-时间 comparison 为 secret 验证
当 comparing secrets (passwords, tokens, MACs), comparison 必须 take 时间 independent 的 values 到 prevent timing 边-channels.
任务
Use cookies 安全
Cookies 必须是 集合具有安全, HttpOnly, SameSite, 和 proper expiration. Learn Cookie attributes 和安全最佳实践.
任务
Use cryptographically 安全 pseudorandom 数字 generator
CSPRNGs 生成输出 indistinguishable 从真 randomness. Learn 正确 APIs 和为什么 Math.random() 是禁止在 安全 contexts.
任务
Use HTTP Digest Authentication
Digest Auth hashes credentials 具有服务器 nonce, preventing password exposure 无 HTTPS. Learn challenge-响应 flow 和 MD5 usage.
任务
Use ECDH 为键 exchange
ECDH (Elliptic Curve Diffie-Hellman) establishes shared secrets using elliptic curves. Smaller 关键, 相同安全 as DH.
任务
Use Merkle trees 为数据验证
Merkle trees hash 数据为 树结构, enabling 高效验证的 individual elements 无 downloading 整个数据集.
任务
Enable OCSP stapling 为 faster TLS handshakes
OCSP stapling lets 服务器提供 fresh revocation 检查到 客户端期间 TLS handshake, avoiding separate round-trip 到 CA.
任务
Use optimistic 并发 control
Optimistic 并发 assumes conflicts 是罕见 — 否 locks, 仅 version checking 开提交. Learn version 列模式.
任务
Use Shamir's Secret Sharing 到拆分关键
Shamir's Secret Sharing splits secret 为 n shares, 任何 k 的哪个能够 reconstruct 它. Useful 为键 escrow, distributed custody, 和 eliminating 单个 points 的失败.
任务
Use 数据库 sharding 为 horizontal 扩缩容
Sharding distributes 数据 across 多个 databases 通过分片键. Learn sharding strategies, cross-分片 queries, 和权衡.
任务
Use Subresource Integrity (SRI) 为外部 resources
SRI ensures 外部 scripts/styles 有不 是 tampered 具有通过 verifying 其 hash. Learn 到生成和 验证完整性 attributes.
任务
Use 数据库 transactions 正确
Transactions 组操作为 atomic units — 所有成功或 所有失败. Learn ACID properties 和隔离级别.
任务
Verify file 或数据完整性具有 checksum
计算 a CRC32 or SHA-256 checksum of data and compare it against a known value to detect corruption or tampering.
任务
校验已下载文件的校验和
在本地计算文件哈希,与发布者的校验和比较,并理解该信任哪种算法。
任务

使用此工具的管道

常见问题

MD5 用于密码安全吗?
不安全。MD5 在安全方面已被破解,仅用于校验和和遗留场景。密码哈希请使用 bcrypt、scrypt 或 Argon2。
应该使用哪种算法?
任何安全敏感场景请使用 SHA-256 或 SHA-512。SHA-1 在抗碰撞方面已弃用。MD5 仅用于非安全校验和。
支持哪些输出格式?
小写十六进制(默认)、大写十六进制和 Base64。十六进制常用于校验和;Base64 更短,用于 JWT 签名和 X.509 证书。
哈希在本地计算吗?
是。SHA-1/256/512 使用浏览器原生 Web Crypto API(crypto.subtle.digest);MD5 使用 spark-md5。数据不会离开你的浏览器。
为什么空字符串的哈希非空?
哈希函数处理固定大小的块。空输入仍会产生摘要,因为函数会对零长度消息应用填充。空字符串的 SHA-256 为 e3b0c442...b855。
可以哈希二进制文件吗?
可以。使用文件选择器加载文件,其字节将直接哈希,不经过文本解码,因此图片、归档和二进制文件均可。

相关工具