The process of MAC generation is similar to the encryption;
The difference is a MAC algorithm need not be reversible
Actually, standard encryption algorithms can be used for MAC generation
hash functions don’t use a secret key
“One-way” in the name refers to the property of such functions: they are easy to compute, but their reverse functions are very difficult to compute.