What it can do
- Use a UTF-8 key
- Calculate HMAC-SHA256
- Show how keyed hashing differs from a plain digest
How the recipe works
HMAC
Combine the message with the shared key according to HMAC and hash with SHA-256.
Demonstration
Sample input
message=helloExpected result
A 64-character HMAC digest.When to use it
- Webhook signature exercises
- Message-authentication demonstrations
- Reproducing API test vectors
Adapt it
Replace the demonstration key only in a trusted local session; never place a production secret in a shareable URL.
Source and verification
Adapted from University of Oviedo: Cryptography Applications lab. The explanation and sample are written for Serialize, use synthetic or documentation-safe data, and are checked against the current operation catalogue. The workflow runs locally without an external API call.