Computes MACs according to ISO 9797-1 standard with configurable algorithm and padding methods. ISO 9797 defines multiple MAC algorithms and padding methods used in banking and payment systems.
Inputs
Algorithm: ISO 9797-1 MAC algorithm.
Padding: ISO 9797-1 padding method.
Key: The MAC key in hexadecimal. 8 bytes for Algorithm 1, 16 bytes for Algorithm 3.
Data: The message data to MAC in hexadecimal.
Tips
ISO 9797 Algorithm 3 with Padding Method 2 is the most commonly specified in banking standards.
Padding Method 2 (0x80 padding) is unambiguous and preferred for variable-length data.