A MAC is a general term describing message authentication code
. That is a tag that will verify the integrity of your data. You willare be able to say whether or not an attacker hashhas tampered with the data that you receive. One construction is HMAC
and it uses a hash function as a basic building block. There is another way which is CBC-MAC
and its improved version CMAC
and is casedbased on block ciphers.