HMAC
HMAC (Hash-based Message Authentication Code) is a keyed hash that uses a secret key and a cryptographic hash function, such as SHA-256, to authenticate a message. It allows the receiver to verify that the message was produced by someone holding the secret key and has not been modified.
Minimal example
mac := hmac.New(sha256.New, secret)
mac.Write([]byte(message))
tag := mac.Sum(nil)