We know that MAC algorithm and key are used in both sender and receiver side to get the matching MAC tages to prove that the data is authentic.
Now in HMAC we know that, it makes use of crytographic hash function which is irreversible, so when we use HMAC from the sender side to encypt a message using the HMAC formula, then at the sender side how will the receiver decrypt the message (hash function is irreversible), so how is the message at the receiver end, integrity is preserved and validated? Please explain.