Image for HMAC (Hash-based Message Authentication Code)

HMAC (Hash-based Message Authentication Code)

HMAC (Hash-based Message Authentication Code) is a security mechanism used to verify the integrity and authenticity of a message. It combines a cryptographic hashing function with a secret key. When a sender wants to ensure their message is not tampered with, they generate a unique code using the message and the secret key. The recipient can then use the same key to generate their own code and compare it with the sender's code. If both codes match, it confirms that the message is authentic and intact. HMAC is widely used in securing communications and data.