public final class CkiContext
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
CkiLibrary |
getCkiLibrary()
Gets the CkiLibrary object of this context.
|
static CkiContext |
getGenericInstance(java.lang.String libraryName)
Gets an instance of CkiContext using the Generic library.
|
java.util.Properties |
getInfo()
Gets information on the cryptoki library.
|
static CkiContext |
getInstance(java.lang.String libraryClass)
Gets an instance of CkiContext
|
java.lang.String |
getLibraryClassName()
Gets the name of the CkiLibrary object used by this context.
|
CkiSlot |
getSlot(int slotNum)
Retrieves the slot represented by the slotNum parameter.
|
java.util.Vector |
getSlots()
Retrieves the slots the system found.
|
public static CkiContext getInstance(java.lang.String libraryClass) throws CryptokiException
libraryClass - The name of the library class from oracle.security.crypto.cryptoki.drivers package.CryptokiExceptionpublic static CkiContext getGenericInstance(java.lang.String libraryName) throws CryptokiException
Note: this generic library should only used for testing purposes.
libraryName - The name of the native library that implements the PKCS#11 specifications to load.CryptokiException
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
public java.util.Vector getSlots()
throws CkiDeviceException
CkiContext supports removable slots (e.g., a USB port implementation), successive calls to the getSlots method are not guaranteed to return the same list.CkiDeviceExceptionpublic CkiSlot getSlot(int slotNum) throws CkiDeviceException
slotNum - The slot number.CkiDeviceException
public java.util.Properties getInfo()
throws CryptokiException
CryptokiExceptionpublic CkiLibrary getCkiLibrary()
public java.lang.String getLibraryClassName()