org.opensc.pkcs11
Class PKCS11Provider
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
java.security.Provider
org.opensc.pkcs11.PKCS11Provider
- All Implemented Interfaces:
- Serializable, Cloneable, Map<Object,Object>, DestroyableParent
public class PKCS11Provider
- extends Provider
- implements DestroyableParent
The PKCS#11 provider of the OpenSC project.
This provider is based on the
RSA Security Inc. PKCS#11 Cryptographic Token Interface (Cryptoki).
- Author:
- wglas
- See Also:
- Serialized Form
|
Method Summary |
void |
cleanup()
Additional function, which may e used by application to cleanup all
allocated C resources of the underlying JNI plugin. |
void |
deregister(Destroyable destroyable)
Deregister a Destroyable from recursive destruction. |
protected void |
finalize()
|
long |
getPkcs11ModuleHandle()
|
void |
register(Destroyable destroyable)
Register a Destroyable for recursive destruction. |
| Methods inherited from class java.security.Provider |
clear, entrySet, getInfo, getName, getService, getServices, getVersion, keySet, load, put, putAll, putService, remove, removeService, toString, values |
| Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML |
| Methods inherited from class java.util.Hashtable |
clone, contains, containsKey, containsValue, elements, equals, get, hashCode, isEmpty, keys, rehash, size |
PKCS11Provider
public PKCS11Provider(String filename)
throws IOException
- Construct a PKCS11 provider instance named OpenSC-PKCS11.
- Parameters:
filename - The full filename of the pkcs11 library to load.
- Throws:
IOException - Upon errors when reading the config stream.
PKCS11Provider
public PKCS11Provider(String filename,
String suffix)
throws IOException
- Construct a PKCS11 provider instance using a modified provider name.
Use this constructor, if you want to load more than one PKCS#11 module
inside your JAVA application.
- Parameters:
filename - The full filename of the pkcs11 library to load.suffix - The suffix to the provier name. The provider will be named
OpenSC-PKCS11-<suffix>.
- Throws:
IOException - Upon errors when reading the config stream.
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
cleanup
public void cleanup()
- Additional function, which may e used by application to cleanup all
allocated C resources of the underlying JNI plugin.
getPkcs11ModuleHandle
public long getPkcs11ModuleHandle()
- Returns:
- Returns the pkcs11ModuleHandle used by calls to the
natvie JNI functions of associated services.
register
public void register(Destroyable destroyable)
- Description copied from interface:
DestroyableParent
- Register a Destroyable for recursive destruction.
- Specified by:
register in interface DestroyableParent
- Parameters:
destroyable - The child to be registered.
deregister
public void deregister(Destroyable destroyable)
- Description copied from interface:
DestroyableParent
- Deregister a Destroyable from recursive destruction.
- Specified by:
deregister in interface DestroyableParent
- Parameters:
destroyable - The child to be deregistered.