HMAC is a message authentication code (MAC) using a hash function. It combines with any cryptographic hash function, for example, md5, sha1, sha256. Working of HMAC includes the following two components : -a cryptographic hash function -a secret cryptographic key.