public class Threading
extends java.lang.Object
implements java.lang.Runnable
This progam initialises the Cryptoki library according to the specified locking model. Then a shared handle to the specified key is created. The specified number of threads are started, where each thread opens a session and then enters a loop which does a triple DES encryption operation using the shared key handle.
It is assumed that the key exists in slot 1, and is a Public Token object.
Usage : java ...Threading -numThreads <numthreads> -keyName <keyname> -locking <lockingmodel> -duration >duration< -userPin >userpin< -slot >slotId< [-v]
| Constructor and Description |
|---|
Threading() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
main execution method
|
static void |
println(java.lang.String s)
easy access to System.out.println
|
void |
run()
The Thread.
|
static void |
usage()
display runtime usage of the class
|
public static void println(java.lang.String s)
public static void usage()
public static void main(java.lang.String[] args)
public void run()
Each thread should have it's own session, so that the cipher state of the session is not corrupted by other threads.
run in interface java.lang.RunnableCopyright (c) SafeNet, Inc. 2012-2016. All rights reserved.