Class (GI Struct)

Gck-2GckAttributes

A set of Attribute structures.

These attributes contain information about a PKCS11 object. Use Object.get or Object.set to set and retrieve attributes on an object.

Index

Constructors

Properties

$gtype: GType<Attributes>

Methods

  • Check whether the attributes contain a certain attribute.

    Parameters

    Returns boolean

    true if the attributes contain the attribute.

  • Get the number of attributes in this attribute array.

    Returns number

    The number of contained attributes.

  • Find an attribute with the specified type in the array.

    Parameters

    • attr_type: number

      The type of attribute to find.

    Returns Gck.Attribute

    the first attribute found with the specified type, or null

  • Find an attribute with the specified type in the array.

    The attribute (if found) must be of the right size to store a boolean value (ie: CK_BBOOL). If the attribute is marked invalid then it will be treated as not found.

    Parameters

    • attr_type: number

      The type of attribute to find.

    Returns [boolean, boolean]

    Whether a value was found or not.

  • Find an attribute with the specified type in the array.

    The attribute (if found) must be of the right size to store a date value (ie: CK_DATE). If the attribute is marked invalid then it will be treated as not found.

    Parameters

    • attr_type: number

      The type of attribute to find.

    Returns [boolean, GLib.Date]

    Whether a value was found or not.

  • Find an attribute with the specified type in the array.

    If the attribute is marked invalid then it will be treated as not found. The resulting string will be null-terminated, and must be freed by the caller using g_free().

    Parameters

    • attr_type: number

      The type of attribute to find.

    Returns [boolean, string]

    Whether a value was found or not.

  • Find an attribute with the specified type in the array.

    The attribute (if found) must be of the right size to store a unsigned long value (ie: CK_ULONG). If the attribute is marked invalid then it will be treated as not found.

    Parameters

    • attr_type: number

      The type of attribute to find.

    Returns [boolean, number]

    Whether a value was found or not.

  • Print out attributes to a string in aform that's useful for debugging or logging.

    The format of the string returned may change in the future.

    Returns string

    a newly allocated string

  • Unreference this attribute array.

    When all outstanding references are gone, the array will be freed.

    Returns void