Generate MAC (GENMAC)
The Generate Message Authentication Code (GENMAC) command
encrypts a variable length of data using cipher block chaining and
returns the last 8 bytes to be used as a message authentication
code.
| Keyword |
Description |
Choices |
Notes |
| DATA |
Input data |
Character value |
Required, Positional 1 |
| DTALEN |
Input data length |
1-32759 |
Required, Positional 2 |
| CPHK |
Cipher key |
Character value |
Required, Positional 3 |
| ICV |
Initial chaining value |
Character value |
Required, Positional 4 |
| RTNVAR |
CL var for returned value |
Character value |
Required, Positional 5 |
| PAD |
Pad option |
*NO, *YES |
Optional, Positional 6 |
| PADCHAR |
Pad character |
Character value, X'00' |
Optional, Positional 7 |
Input data (DATA)
Specifies the data, or a variable containing the data, to be
encrypted. The data must be at least as long as the length
specified in the Input data length prompt (DTALEN
parameter). This is a required parameter.
Input data length (DTALEN)
Specifies the length, or a variable containing the length, of
the data to be encrypted. The length must be less than 32,760. This
is a required parameter.
Cipher key (CPHK)
Specifies an 8-byte value, or a variable containing an 8-byte
value, to be used as the key for the data encryption algorithm.
This value must be the value of the key encrypted under the host
master key. There are no restrictions on the value of this
parameter. This is a required parameter.
Initial chaining value (ICV)
Specifies an 8-byte value, or a variable containing an 8-byte
value, to be used as the initial chaining value when performing
cipher block chaining. There are no restrictions on the value of
this parameter. This is a required parameter.
CL var for returned value (RTNVAR)
Specifies a variable to receive the 8-byte message
authentication code. This is a required parameter.
Pad option (PAD)
Specifies whether padding is to be performed.
The possible values are:
- *NO
- Padding will not be performed.
- *YES
- Before encrypting, the data is padded out to the next 8-byte
multiple using the pad character specified in the Pad
character prompt (PADCHAR parameter). The last byte is then
replaced with a count of the number of pad characters.
Pad character (PADCHAR)
Specifies a 1-byte value, or a variable containing a 1-byte
value, to be used as the pad character when *YES is specified for
the Pad option prompt (PAD parameter). The default (1-byte
pad character) is hex 00.