what is hmac
SHA-1 HMAC Generation. In cryptography, a keyed-hash message authentication code (HMAC) is a specific construction for calculating a message authentication code (MAC) involving a cryptographic hash function in combination with a secret cryptographic key.he following is a Python implementation of HMAC-MD5: Python includes an hmac module, so the function above can be replaced by a shorter version. The following is a PHP implementation of HMAC-SHA1: PHP includes an hmac function, so the example above can be replaced by a shorter version.