Example #1
0
func SignWithSecret(c common.Context, s string) string {
	key := appSecret(c)

	c.Debugf("Pusher signing %s with key %s", s, key)

	h := hmac.New(sha256.New, []byte(key))
	h.Write([]byte(s))
	return hex.EncodeToString(h.Sum(nil))
}