Class Pkcs11Lib

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class Pkcs11Lib
    extends CrtResource
    Handle to a loaded PKCS#11 library. For most use cases, a single instance of Pkcs11Lib should be used for the lifetime of your application.
    • Constructor Detail

      • Pkcs11Lib

        public Pkcs11Lib​(java.lang.String path)
        Load and initialize a PKCS#11 library. C_Initialize() and C_Finalize() are called on the PKCS#11 library in the DEFAULT way.
        Parameters:
        path - path to PKCS#11 library.
      • Pkcs11Lib

        public Pkcs11Lib​(java.lang.String path,
                         Pkcs11Lib.InitializeFinalizeBehavior initializeFinalizeBehavior)
        Load a PKCS#11 library, specifying how C_Initialize() and C_Finalize() will be called.
        Parameters:
        path - path to PKCS#11 library.
        initializeFinalizeBehavior - specifies how C_Initialize() and C_Finalize() will be called on the PKCS#11 library.