跳到主要内容
uencoder

HMAC 生成器

使用 SHA-1/256/512 生成 HMAC(哈希消息认证码)。免费、隐私优先、100% 纯客户端运行。

尝试示例:
Local only

最近历史

暂无历史

使用方法

  1. 输入要认证的消息。
  2. 提供密钥。
  3. 选择哈希算法和输出格式。
  4. 复制 HMAC 摘要。

使用此工具的任务

Derive cryptographic 键从 password using KDF
Turn human-memorable password 为固定-长度键 suitable 为 AES 或 HMAC using PBKDF2, scrypt, 或 bcrypt 具有 salt.
任务
生成 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.
任务
生成 a Certificate Signing Request (CSR)
CSR contains 你的公共键 和 identity 信息, sent 到 CA 到 obtain signed TLS certificate. Learn 需要 fields 和验证处理.
任务
生成 cryptographically secure session keys
会话关键必须是 unpredictable 和唯一 per 会话. Learn 到生成它们 using CSPRNG 和 derive sub-keys 具有 HKDF.
任务
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 end-to-end 加密 (E2EE)
End-to-end 加密 ensures 仅 communicating parties 能够读取 messages — 否 intermediary 服务器 holds 解密关键. Learn hybrid 加密模式.
任务
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 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.
任务
Use AES 在 CTR 模式 as 流式处理 cipher
AES-CTR turns 阻止 cipher 为 keystream generator, eliminating padding. Learn 正确 counter 管理和 为什么你 必须添加认证 separately.
任务
Use AES 在 GCM 模式为 已认证加密
AES-GCM provides 两者保密性和 完整性在 单个操作, detecting tampering 无 separate HMAC. 它是 recommended AES 模式为 最多 applications.
任务
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 HTTP Digest Authentication
Digest Auth hashes credentials 具有服务器 nonce, preventing password exposure 无 HTTPS. Learn challenge-响应 flow 和 MD5 usage.
任务
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 Subresource Integrity (SRI) 为外部 resources
SRI ensures 外部 scripts/styles 有不 是 tampered 具有通过 verifying 其 hash. Learn 到生成和 验证完整性 attributes.
任务

使用此工具的管道

常见问题

HMAC 用于什么?
HMAC 使用密钥同时验证数据完整性和真实性。常用于 API 签名、JWT 和 webhook。
应该使用哪种哈希?
推荐 SHA-256。SHA-1 仅用于遗留兼容。SHA-512 提供更大的安全余量。
我的密钥会被存储或传输吗?
不会。密钥仅在内存中用于 HMAC 计算,绝不存储、记录或发送到任何服务器。
支持哪些输出格式?
可将 HMAC 摘要输出为小写十六进制或 Base64 字符串。
如果提供空密钥会怎样?
工具会返回 MISSING_KEY 错误,因为 HMAC 需要非空密钥。

相关工具