A worked example, rendered from real sample data. Sign in to run the tool on your own input.
secret-message
my-secret-key
sha256Algorithm: HMAC-SHA256
Key: 13 bytes (utf8)
Message: 14 bytes
Digest size: 32 bytes
Hex: eba37f0bdcb8c6e87d4a4d419caedf62bc2fe231a17843e3d21f01d3d4792d01
Base64: 66N/C9y4xuh9Sk1BnK7fYrwv4jGheEPj0h8B09R5LQE=
Base64url: 66N_C9y4xuh9Sk1BnK7fYrwv4jGheEPj0h8B09R5LQE
openssl equivalent:
printf %s 'secret-message' | openssl dgst -sha256 -hmac 'my-secret-key'
Notes:
- Key is only 13 bytes. Signing keys should be at least 32 random bytes.
Generate HMAC with multiple algorithms. Part of the DevTools Surf developer suite. Browse more tools in the Security / Crypto collection.