Parameters

The parameters for CSNBMDG.

For the definitions of the return_code, reason_code, exit_data_length, and exit_data parameters, see Parameters common to all verbs.

text_length
A pointer to an integer variable containing the number of bytes of data in the text variable. See Restrictions.
text
A pointer to a string variable containing the text for which the verb calculates the MDC value.
rule_array_count
A pointer to an integer variable containing the number of elements in the rule_array variable. This value can be 0, 1, or 2.
rule_array
Keywords that provide control information to the verb. A keyword specifies the method for calculating the RSA digital signature. Each keyword is left-aligned in an 8-byte field and padded on the right with blanks. All keywords must be in contiguous storage. The rule_array keywords are described in Table 1.
Table 1. Keywords for MDC Generate control information
Keyword Description
Segmenting and key control (One, optional)
ONLY Specifies that segmenting is not used and the default key is used. This is the default.
FIRST Specifies the first segment of text, and use of the default key.
MIDDLE Specifies an intermediate segment of text, or the first segment of text and use of a user-supplied key.
LAST Specifies the last segment of text, or that segmenting is not used, and use of a user-supplied key.
Algorithm mode (One, optional)
MDC-2 Specifies two encipherments for each 8-byte block using MDC procedures. This is the default.
MDC-4 Specifies four encipherments for each 8-byte block using MDC procedures.
PADMDC-2 Specifies two encipherments for each 8-byte block using PADMDC procedures.
PADMDC-4 Specifies four encipherments for each 8-byte block using PADMDC procedures.
chaining_vector
A pointer to an 18-byte string variable the security server uses as a work area to hold segmented data between verb invocations.
Important: When segmenting text, the application program must not change the data in this string between verb calls to the MDC Generate verb.
mdc
A pointer to a user-supplied MDC key or to a 16-byte string variable containing the MDC value. This value can be the key that the application program provides. This variable is also used to hold the intermediate MDC result when segmenting text.
IMPORTANT: When segmenting text, the application program must not change the data in this string between verb calls to the MDC Generate verb.