JNI sample modules and sample code
To illustrate the two JNI access methods and also how to use the CCA JNI to call CCA verbs, sample modules are provided.
- mac.java
- illustrates JNI calls versus C calls to CCA.
This sample program calls the same CCA verbs as the sample C language program named mac.c.
This sample program uses the package infrastructure of the new JNI access method.
For more information about this sample program, see Sample program in Java. - RNGpk.java
- illustrates the method available for calling the JNI.
- Java™ class implementations (*.java
files) that call CCA JNI functions
need an import line, such as this:
import com.ibm.crypto.cca.jni.*; - The Java classpath must point to CNM.jar.
- Java™ class implementations (*.java
files) that call CCA JNI functions
need an import line, such as this:
The default location of the sample code is /opt/IBM/CCA/samples for both, SUSE and Red Hat distributions.