Comment by loeg
> It's also super simple: It's almost literally just concatenating the secret and the message you want to authenticate together, and take an ordinary hash (like SHA256) of that, the rest of it is just to deal with padding.
It's not quite as simple as that. The output of the first hash is hashed a second time (to prevent length extension attacks).
Thanks, forgot to mention that. Needless to say, I always consult real cryptographers when working on stuff like that.