cursorMAC computes HMAC-SHA256 of payload under secret. Mirrors approvaltoken.signMAC so the two signing paths stay convention-identical.
(secret, payload []byte)
| 126 | // cursorMAC computes HMAC-SHA256 of payload under secret. Mirrors |
| 127 | // approvaltoken.signMAC so the two signing paths stay convention-identical. |
| 128 | func cursorMAC(secret, payload []byte) []byte { |
| 129 | mac := hmac.New(sha256.New, secret) |
| 130 | mac.Write(payload) |
| 131 | return mac.Sum(nil) |
| 132 | } |
no test coverage detected