(secret, payload []byte)
| 152 | } |
| 153 | |
| 154 | func signMAC(secret, payload []byte) []byte { |
| 155 | mac := hmac.New(sha256.New, secret) |
| 156 | mac.Write(payload) |
| 157 | return mac.Sum(nil) |
| 158 | } |
| 159 | |
| 160 | // PeekMessageID extracts the message_id from a token *without* verifying |
| 161 | // the HMAC. Useful when the caller needs to look up the owning user's |