CmdID

CmdID / aws / aws payment-cryptography-data

aws payment-cryptography-data verify-mac

Verifies a Message Authentication Code (MAC). AWS CLI reference

1 example 5 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To verify a MAC

The following verify-mac example verifies a Hash-Based Message Authentication Code (HMAC) for card data authentication using the algorithm HMAC_SHA256 and an HMAC encryption key.

aws payment-cryptography-data verify-mac --key-identifier arn:aws:payment-cryptography:us-west-2:123456789012:key/qnobl5lghrzunce6 --message-data "3b343038383439303031303733393431353d32343038323236303030373030303f33" --verification-attributes='Algorithm=HMAC_SHA256' --mac ED87F26E961C6D0DDB78DA5038AA2BDDEA0DCE03E5B5E96BDDD494F4A7AA470CIdentify
--key-identifierThe keyARN of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.
--message-dataThe data on for which MAC is under verification.
--verification-attributesThe attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.
--macThe MAC being verified.
Its output
{
    "KeyArn": "arn:aws:payment-cryptography:us-west-2:123456789012:key/qnobl5lghrzunce6",
    "KeyCheckValue": "2976E7"
}

For more information, see Verify MAC in the AWS Payment Cryptography User Guide.

Options

5 in the AWS CLI reference
--key-identifierThe keyARN of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.
--mac-lengthThe length of the MAC.
--macThe MAC being verified.
--message-dataThe data on for which MAC is under verification.
--verification-attributesThe attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.