GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfPkcs11Module Class

    Namespace:
    GemBox.Pdf.Security
    Assembly:
    GemBox.Pdf.dll

    Represents a cryptographic device that stores cryptographic information and possibly performs cryptographic functions accessible through PKCS#11 application programming interface called "Cryptoki".

    Cryptographic device may be implemented as a smart card, smart disk, PCMCIA card, or with some other technology, including software-only.

    note

    GemBox.Pdf uses Pkcs11Interop to communicate with a cryptographic device from a .NET runtime so your project must reference NuGet package Pkcs11Interop in order to use this class.

    important

    After you are finished using PdfPkcs11Module make sure you either dispose it or call its Close() method.

    • C#
    • VB.NET
    public sealed class PdfPkcs11Module : IDisposable
    Public NotInheritable Class PdfPkcs11Module
        Implements IDisposable
    Inheritance:
    System.Object
    PdfPkcs11Module
    Implements
    System.IDisposable

    Constructors

    PdfPkcs11Module(String, Boolean)

    Initializes a new instance of the PdfPkcs11Module class using a path to the specified PKCS#11 module.

    • C#
    • VB.NET
    public PdfPkcs11Module(string libraryPath, bool performLocking = true)
    Public Sub New(libraryPath As String, performLocking As Boolean = True)
    Parameters
    libraryPath
    System.String

    The path to the PKCS#11 module (usually a .dll).

    performLocking
    System.Boolean

    If set to true (recommended option), the PKCS#11 module will be used from multi-threaded application and needs to perform locking with native OS threading model; otherwise, the PKCS#11 module will be used from single-threaded application and does not need to perform any kind of locking.

    Properties

    CryptokiVersion

    Gets the Cryptoki interface version number.

    • C#
    • VB.NET
    public string CryptokiVersion { get; }
    Public ReadOnly Property CryptokiVersion As String
    Property Value
    System.String

    The Cryptoki interface version number.

    LibraryPath

    Gets the path to the PKCS#11 module (usually a .dll).

    • C#
    • VB.NET
    public string LibraryPath { get; }
    Public ReadOnly Property LibraryPath As String
    Property Value
    System.String

    The path to the PKCS#11 module (usually a .dll).

    LibraryVersion

    Gets the Cryptoki library version number.

    • C#
    • VB.NET
    public string LibraryVersion { get; }
    Public ReadOnly Property LibraryVersion As String
    Property Value
    System.String

    The Cryptoki library version number.

    ModuleDescription

    Gets the description of the library.

    • C#
    • VB.NET
    public string ModuleDescription { get; }
    Public ReadOnly Property ModuleDescription As String
    Property Value
    System.String

    The description of the library.

    ModuleManufacturerId

    Gets the ID of the Cryptoki library manufacturer.

    • C#
    • VB.NET
    public string ModuleManufacturerId { get; }
    Public ReadOnly Property ModuleManufacturerId As String
    Property Value
    System.String

    The ID of the Cryptoki library manufacturer.

    Tokens

    Gets the tokens present in all slots of this cryptographic device.

    • C#
    • VB.NET
    public IList<PdfPkcs11Token> Tokens { get; }
    Public ReadOnly Property Tokens As IList(Of PdfPkcs11Token)
    Property Value
    System.Collections.Generic.IList<PdfPkcs11Token>

    The tokens present in all slots of this cryptographic device.

    Methods

    Close()

    Indicates that an application is finished with the Cryptoki library. It should be the last Cryptoki call made by an application.

    • C#
    • VB.NET
    public void Close()
    Public Sub Close
    See Also
    5.4.2 C_Finalize

    Dispose()

    Closes the PdfPkcs11Module.

    • C#
    • VB.NET
    public void Dispose()
    Public Sub Dispose
    See Also
    Close()

    ToString()

    Returns a System.String that represents this PdfPkcs11Module instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this PdfPkcs11Module instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Implements

    System.IDisposable

    Examples

    PKCS#11 (Cryptoki) digital signature example

    See Also

    Pkcs11Interop
    PKCS #11 Cryptographic Token Interface Base Specification Version 3.0
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.