In Go: hmac.New(sha256.New, key), write the message, Sum(nil). Compare tags with hmac.Equal.
HMAC
A message authentication code built from a hash and a secret key; unlike sha256(secret||msg) it resists length extension.
In Go: hmac.New(sha256.New, key), write the message, Sum(nil). Compare tags with hmac.Equal.