HMAC Generator
Professional-grade HMAC calculator for developers. Verify API webhooks (Stripe, Slack, AWS) with SHA-256, SHA-512, MD5. Features real-time comparison, secret masking, and instant Base64/Hex encoding.
About
In modern distributed architectures, the integrity of communication between services is non-negotiable. The Hash-based Message Authentication Code (HMAC) standard, defined in RFC 2104, provides a mechanism to verify both the data integrity and the authenticity of a message. Unlike a simple hash, which anyone can generate, an HMAC requires a Secret Key known only to the sender and receiver.
This tool is engineered for developers debugging webhook integrations (e.g., Stripe, Slack, Shopify) or building signed API requests. It leverages the browser's native SubtleCrypto API for maximum performance and security, ensuring that sensitive keys never leave your local environment. It addresses common implementation pitfalls such as character encoding mismatches, hidden whitespace, and incorrect padding in Base64 outputs.
Formulas
The HMAC algorithm uses a specific construction to prevent length-extension attacks that affect simple H(key ∥ message) constructions. The formal definition allows for any iterative cryptographic hash function.
Where:
• H is the hash function (e.g., SHA-256).
• K′ is the key padded to the block size.
• opad is the outer padding byte (0x5c) repeated.
• ipad is the inner padding byte (0x36) repeated.
Reference Data
| Standard | Algorithm | Output (Bits) | Output (Hex Chars) | Security Context | Industry Usage |
|---|---|---|---|---|---|
| MD5 | Message Digest 5 | 128 | 32 | COMPROMISED | Legacy checksums, non-critical file verification. |
| SHA-1 | Secure Hash Algo 1 | 160 | 40 | WEAK | Git (historic), older payment gateways (e.g., PayPal IPN). |
| SHA-256 | Secure Hash Algo 2 | 256 | 64 | RECOMMENDED | Stripe, Shopify, JWT, AWS SigV4, SSL. |
| SHA-384 | Secure Hash Algo 2 | 384 | 96 | HIGH | NSA Suite B, Top Secret classification systems. |
| SHA-512 | Secure Hash Algo 2 | 512 | 128 | MAXIMUM | Future-proofing, high-entropy password hashing. |