Definition for the base key object class

  • defines the object class CKO_PUBLIC_KEY, CKO_PRIVATE_KEY and CKO_SECRET_KEY for type CK_OBJECT_CLASS as used in the CKA_CLASS attribute of objects

Hierarchy (view full)

Constructors

Properties

Object class (type)

derive: boolean

CK_TRUE if key supports key derivation (i.e., if other keys can be derived from this one (default CK_FALSE)

  • May be modified after object is created with a C_SetAttributeValue call, or in the process of copying object with a C_CopyObject call. However, it is possible that a particular token may not permit modification of the attribute during the course of a C_CopyObject call.

Returns

boolean

endDate: Date

End date for the key (default empty)

  • May be modified after object is created with a C_SetAttributeValue call, or in the process of copying object with a C_CopyObject call. However, it is possible that a particular token may not permit modification of the attribute during the course of a C_CopyObject call.
handle: Buffer

ID of PKCS#11 object

id: Buffer

Key identifier for key (default empty)

  • May be modified after object is created with a C_SetAttributeValue call, or in the process of copying object with a C_CopyObject call. However, it is possible that a particular token may not permit modification of the attribute during the course of a C_CopyObject call.
label: string

Description of the object (default empty)

lib: PKCS11

PKCS#11 module

local: boolean

CK_TRUE only if key was either * generated locally (i.e., on the token) with a C_GenerateKey or C_GenerateKeyPair call * created with a C_CopyObject call as a copy of a key which had its CKA_LOCAL attribute set to CK_TRUE

  • Must not be specified when object is created with C_CreateObject.
  • Must not be specified when object is generated with C_GenerateKey or C_GenerateKeyPair.
  • Must not be specified when object is unwrapped with C_UnwrapKey.
mechanism: KeyGenMechanism

Identifier of the mechanism used to generate the key material.

  • Must not be specified when object is created with C_CreateObject.
  • Must not be specified when object is generated with C_GenerateKey or C_GenerateKeyPair.
  • Must not be specified when object is unwrapped with C_UnwrapKey.
modifiable: boolean

true if object can be modified. Default is false

private: boolean

true if object is a private object and false if object is a public object. Default value is token-specific, and may depend on the values of other attributes of the object.

session: Session

PKCS#11 session

startDate: Date

Start date for the key (default empty)

  • May be modified after object is created with a C_SetAttributeValue call, or in the process of copying object with a C_CopyObject call. However, it is possible that a particular token may not permit modification of the attribute during the course of a C_CopyObject call.
token: boolean

true if object is a token object and false if object is a session object. Default is false.

type: KeyType

Type of key

  • Must be specified when object is created with C_CreateObject
  • Must be specified when object is unwrapped with C_UnwrapKey

Accessors

  • get size(): number
  • Gets the size of an object in bytes

    Returns number

Methods

  • Retrieves information about PKCS#11 object and fills fields

    Returns void

  • Sets attribute value

    Parameters

    • type: number

      Attribute type

    • value: string | number | boolean | Buffer

      Attribute value

    Returns void

  • Sets attribute value

    Parameters

    • name: string

      Attribute name. See ITemplate

    • value: any

      Attribute value. Depends on attribute name

    Returns void

  • Sets attributes from the list of attributes

    Parameters

    Returns void

Generated using TypeDoc