Tiny Online Tools logoTiny Online Toolssearch搜索工具…grid_view全部工具
首页chevron_right安全工具chevron_rightHMAC 生成器HMAC 生成器

HMAC 生成器

从文本生成 HMAC 签名。

info在上方输入密钥和消息以生成 HMAC 签名。

相似工具

MD5 生成器

MD5 生成器

快速生成 MD5 哈希值。

SHA-256 生成器

SHA-256 生成器

从文本生成 SHA-256 哈希。

Bcrypt 生成器

Bcrypt 生成器

生成 bcrypt 密码哈希值。

JWT 签名验证器

JWT 签名验证器

在浏览器中本地验证 HMAC JWT 签名。

SVG转PNG

SVG转PNG

在浏览器中将SVG文件渲染为任意尺寸的PNG图片。

vCard QR 生成器

vCard QR 生成器

创建 a contact card QR 代码 that phones can 扫描到 add contacts directly.

Office 文件通用检查器

Office 文件通用检查器

打开 DOCX、XLSX、PPTX、ODT、XPS、MHTML、CHM 和 Publisher 文件,在浏览器中查看其部件、关系与元数据。

apps

更多工具

浏览我们完整的免费在线工具集合。

HMAC Generator

While regular hashing functions like SHA-256 prove data integrity ("this file hasn't been modified"), they don't prove origin ("this file came from someone I trust"). HMAC (Hash-based Message Authentication Code) solves that by combining a message with a secret key, producing a signature that only someone with the secret key could have 生成d. This tool 创建s HMAC signatures used in API authentication, webhook verification, and digital signatures.

How HMAC differs from plain hashing

If you hash a message, anyone can verify the hash matches—they just recompute it. But with HMAC, you hash the message combined with a secret key. An attacker who intercepts the message and hash cannot 创建 a valid HMAC for a modified message without knowing the secret key. This makes HMAC perfect for situations where you need to prove both integrity and authenticity.

Real-world HMAC usage

Web APIs frequently use HMAC for request signing. A client hashes their request body with their secret API key and includes the resulting signature in the request. The server repeats this calculation and verifies the signature matches—proving the request came from the legitimate client and wasn't tampered with. Webhook providers use the same approach: they sign the webhook payload with their secret, and you verify the signature before processing the webhook.

Algorithm selection

This tool supports HMAC with SHA-1, SHA-256, SHA-384, and SHA-512. Prefer SHA-256 or higher for new applications. SHA-1 is older and less secure, though for HMAC specifically (rather than plain hashing), SHA-1 remains acceptable in some legacy systems.

Key management

The strength of HMAC depends entirely on keeping the secret key secret. If your API key or signing key is compromised, attackers can forge valid signatures. Store keys securely (in environment variables or secrets managers), never commit them to version control, and rotate them periodically.