Direct Method

This method is documented here for completeness. The IBMPKCS11Impl provider has two constructors. One takes the configuration file's full pathname as argument. The usage is described in Using Configuration File section. The other one has no arguments. You can call it to construct an IBMPKCS11Impl provider instance. It is initially empty, and you must initialize it to make it functional.

Here are the code snippets: p1 = new;
p1.Init("c:\\program files\\LunaSA\\cryptoki.dll:0", "password".toCharArray());
The format of the string supplied to the Init methods is:
<hardware device PKCS #11 library name>:<slot #>
<configuration file name>
Note: Problems will occur when two IBMPKCS11Impl providers in the provider list share the same provider name. This can happen if two IBMPKCS11Impl providers are initialized with the same configuration file or if the two providers are initialized using the 1.4.2 initializations. If you could get a PKCS11Exception the exception message is like Invalid dll name : c:\program files\LunaSA\cryptoki. If you use Login Module mechanism, you could get a LoginException with such messages- Cryptoki is already initialized. This is not a problem with using configuration file. That is, if the configuration file is specified with the provider name in the provider list, you still can programmatically initialize a new provider using the same configuration file.