VerifyMac
Source:
src/AWS/PaymentCryptography/VerifyMac.ts
Runtime binding for payment-cryptography:VerifyMac — verifies a Message
Authentication Code against hex-encoded message data under a Key.
A mismatched MAC fails with the typed VerificationFailedException.
Provide VerifyMacHttp on the Function to satisfy this service.
Verifying MACs
Section titled “Verifying MACs”// initconst verifyMac = yield* PaymentCryptography.VerifyMac(macKey);
// runtime — MessageData and Mac are hex-encodedyield* verifyMac({ MessageData: "31323334353637383930313233343536", Mac: mac, VerificationAttributes: { Algorithm: "HMAC" },});