Gjsify LogoGjsify Logo

A set of [structAttribute] structures.

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

record

Hierarchy

  • Attributes

Index

Constructors

  • Create a new empty GckAttributes array.

    The returned set of attributes is floating, and should either be passed to another gck library function which consumes this floating reference, or if you wish to keep these attributes around you should ref them with gck_attributes_ref_sink() and unref them later with gck_attributes_unref().

    Parameters

    • reserved: number

      Should be set to always be [constINVALID]

    Returns Attributes

Properties

name: string

Methods

  • Get attribute at the specified index in the attribute array.

    Use [methodAttributes.count] to determine how many attributes are in the array.

    Parameters

    • index: number

      The attribute index to retrieve.

    Returns Gck.Attribute

  • count(): number
  • dump(): void
  • find_boolean(attr_type: number): [boolean, boolean]
  • 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]

  • find_date(attr_type: number): [boolean, GLib.Date]
  • 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]

  • find_string(attr_type: number): [boolean, string]
  • 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]

  • find_ulong(attr_type: number): [boolean, number]
  • 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]

  • #GckAttributes uses a floating reference count system. [methodBuilder.end] and [ctorAttributes.new_empty] both return floating references.

    Calling this function on a GckAttributes with a floating reference will convert the floating reference into a full reference. Calling this function on a non-floating GckAttributes results in an additional normal reference being added.

    In other words, if the attrs is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference. If the attrs is not floating, then this call adds a new normal reference increasing the reference count by one.

    All Gck library functions that assume ownership of floating references are documented as such. Essentially any Gck function that performs an operation using a #GckAttributes argument rather than operating on the attributes themselves, will accept a floating reference.

    Returns Attributes

  • to_string(): string
  • 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

  • unref(): void
  • Unreference this attribute array.

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

    Returns void

  • Create a new empty GckAttributes array.

    The returned set of attributes is floating, and should either be passed to another gck library function which consumes this floating reference, or if you wish to keep these attributes around you should ref them with gck_attributes_ref_sink() and unref them later with gck_attributes_unref().

    Parameters

    • reserved: number

      Should be set to always be [constINVALID]

    Returns Attributes

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method