Question: why use hmac over mac?
Answer: Hash-based message authentication code, or HMAC, is an important building block for proving that data transmitted between the components of a system has not been tampered with. HMAC is a widely used cryptographic technology. ... You need to understand Message Authentication Code (MAC) first.