Question: what is the difference between a message authentication code and a one-way hash function?
Answer: The main difference is conceptual: while hashes are used to guarantee the integrity of data, a MAC guarantees integrity AND authentication. ... To be considered secure, a MAC function must resist existential forgery under chosen-plaintext attacks.