Sample verb call routines
This topic contains sample verb call routines for both C and Java™.
Important: The user must load the Symmetric Master Key before the verb
calls complete successfully. Otherwise return code 12 and reason code 764 is returned.
To illustrate the practical application of CCA verb calls, this appendix describes the sample routines included with the RPM. A sample in C, and one in Java is included.
The sample routines generate a Message Authentication Code (MAC) on a text string, and then
verifies the MAC. To accomplish this, the routine:
- calls the Key Generate (CSNBKGN or CSNBKGNJ) verb to create a MAC/MACVER key pair.
- calls the MAC Generate (CSNBMGN or CSNBMGNJ) verb to generate a MAC on a text string with the MAC key.
- calls the MAC Verify (CSNBMVR or CSNBMVRJ) verb to verify the text string MAC with the MACVER key.
As you review the sample routines shown in Figure 1 and Figure 1,
refer to the descriptions of the called
verbs and their parameters in this publication. These verbs are listed in Table 1.
| Verb | Entry point name for C and Java versions |
|---|---|
| Key Generate | CSNBKGN or CSNBKGNJ |
| MAC Generate | CSNBMGN or CSNBMGNJ |
| MAC Verify | CSNBMVR or CSNBMVRJ |