Computes Message Authentication Codes using ANSI X9.9 (single DES CBC-MAC) and ANSI X9.19 (retail MAC with double-length key). Used extensively in payment messaging for integrity and authentication.
Inputs
Algorithm: The MAC algorithm variant.
Key: The MAC key in hexadecimal. 8 bytes for X9.9, 16 bytes for X9.19.
Data: The message data to MAC in hexadecimal.
Tips
ANSI X9.19 (retail MAC) is the most common MAC in payment networks.
The MAC is typically 8 bytes (16 hex chars) but often truncated to 4 bytes.
MAC protects message integrity — any change to the data changes the MAC.