Class Mechanism

Represents a PKCS#11 mechanism

Hierarchy (view full)

Constructors

  • Initializes the mechanism structure

    Parameters

    • type: number

      The type of mechanism

    • handle: Buffer

      The ID of mechanism

    • slotHandle: Buffer

      The ID of the token’s slot

    • lib: PKCS11

      PKCS#11 module

    Returns Mechanism

Properties

flags: number

Bit flag specifying mechanism capabilities

handle: Buffer

ID of PKCS#11 object

lib: PKCS11

PKCS#11 module

maxKeySize: number

The maximum size of the key for the mechanism

whether this is measured in bits or in bytes is mechanism-dependent

minKeySize: number

The minimum size of the key for the mechanism

whether this is measured in bits or in bytes is mechanism-dependent

slotHandle: Buffer

The ID of the token’s slot

The mechanism type number

Accessors

Methods

  • Adds a vendor mechanisms to MechanismEnum from the specified file

    Parameters

    • jsonFile: string

      Path to JSON file with vendor mechanisms

    Returns void

  • Adds a vendor mechanism to MechanismEnum

    Parameters

    • name: string

      Mechanism name

    • value: number

      Mechanism value

    Returns void