MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / signMAC

Function signMAC

internal/approvaltoken/token.go:154–158  ·  view source on GitHub ↗
(secret, payload []byte)

Source from the content-addressed store, hash-verified

152}
153
154func 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

Callers 2

SignFunction · 0.85
VerifyFunction · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected