DevMate
Back to Toolverse

Crypto

HMAC Generator

Compute a keyed SHA message authentication code for an integration fixture without changing the input serialization.

Local processing
Loading tool workspace...

About this tool

When to use it

Compute a keyed SHA message authentication code for an integration fixture without changing the input serialization.

How to use it

Choose the hash algorithm, enter a test secret and the exact message, then generate the HMAC. Match the receiving protocol's encoding, whitespace, and canonicalization rules before comparing values.

Guide updated . Examples checked against this implementation.

Worked examples

A known SHA-256 fixture

Input

Message: The quick brown fox jumps over the lazy dog; Secret: key; Algorithm: SHA-256

Expected output

f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8

Both message and secret are interpreted as UTF-8 text. There is no final newline, hex-key decoding, or Base64-key decoding in this example.

Errors and unsupported input

A webhook signature differs despite visually equal JSON

Check raw body bytes, field order, whitespace, secret encoding, and digest output encoding. Parsing and reserializing JSON can change the signed message.

Continue this workflow

  • Hash Generator: Compare an unkeyed hash when sender authentication is not needed.

Questions

Frequently asked questions

Should I paste a hex-encoded secret as text?

Only if the protocol treats those characters as the key. This tool encodes the literal text as UTF-8 rather than interpreting it as hexadecimal bytes.