Compute HMAC-SHA512 message authentication codes

Create an HMAC-SHA-512 authentication tag for a message and shared secret.

freeworks offlinenothing uploaded
ToolHMAC-SHA512
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

HMAC hashes an inner pad concatenated with the message, then hashes an outer pad concatenated with that inner digest. SHA-512 supplies the compression function and a 128-byte block size; keys longer than the block are hashed first.

  • HMAC separates key mixing from message hashing and avoids naïve length-extension constructions.

Worked example

Compute HMAC-SHA512 message authentication codes
Generate an HMAC-SHA512 authentication code for a message
Input
											Input: Hello, World!
Key: MySecretKey123!
										
Output
												3eae1073dc45c5a21427c85daf48fd6e6d56ab14e15d72209119e5651566727b11cd30d68d3adb9c21f246c4e518065481e89889c4426d77c741e9ce890e601b
											

When to use this

API request signing, webhook verification, and shared-secret protocols create HMAC tags.

Edge cases

  • Changing one key byte changes the tag.
  • Comparing tags with an early-exit string check can leak timing.
  • HMAC authentication does not encrypt the message.

References