Gck.Object
Description: Reference for Gck.Object

### Class

# GckObject

#### Description [src]

    class Gck.Object : GObject.Object
    {
      /* No available fields */
    }

Holds a handle to a PKCS11 object such as a key or certificate. Token objects are stored on the token persistently. Others are transient and are called session objects.

#### Ancestors

- GObject

#### Constructors

###### gck_object_from_handle

Initialize a GckObject from a raw PKCS#11 handle. Normally you would use `gck_session_create_object()` or `gck_session_find_objects()` to access objects.

#### Instance methods

###### gck_object_cache_lookup

Lookup attributes in the cache, or retrieve them from the object if necessary.

###### gck_object_cache_lookup_async

Lookup attributes in the cache, or retrieve them from the object if necessary.

###### gck_object_cache_lookup_finish

Complete an operation to lookup attributes in the cache or retrieve them from the object if necessary.

###### gck_object_destroy

Destroy a PKCS#11 object, deleting it from storage or the session. This call may block for an indefinite period.

###### gck_object_destroy_async

Destroy a PKCS#11 object, deleting it from storage or the session. This call will return immediately and complete asynchronously.

###### gck_object_destroy_finish

Get the status of the operation to destroy a PKCS#11 object, begun with gck_object_destroy_async().

###### gck_object_equal

Checks equality of two objects. Two GckObject objects can point to the same underlying PKCS#11 object.

###### gck_object_get

Get the specified attributes from the object. This call may block for an indefinite period.

###### gck_object_get_async

Get the specified attributes from the object. The attributes will be cleared of their current values, and new attributes will be stored. The attributes should not be accessed in any way except for referencing and unreferencing them until `gck_object_get_finish()` is called.

###### gck_object_get_data

Get the data for the specified attribute from the object. For convenience the returned data has a null terminator.

###### gck_object_get_data_async

Get the data for the specified attribute from the object.

###### gck_object_get_data_finish

Get the result of an operation to get attribute data from an object. For convenience the returned data has an extra null terminator, not included in the returned length.

###### gck_object_get_data_full

Get the data for the specified attribute from the object. For convenience the returned data has an extra null terminator, not included in the returned length.

###### gck_object_get_finish

Get the result of a get operation and return specified attributes from the object.

###### gck_object_get_full

Get the specified attributes from the object. This call may block for an indefinite period.

###### gck_object_get_handle

Get the raw PKCS#11 handle of a GckObject.

###### gck_object_get_module

Get the PKCS#11 module to which this object belongs.

###### gck_object_get_session

Get the PKCS#11 session assigned to make calls on when operating on this object.

###### gck_object_get_template

Get an attribute template from the object. The attr_type must be for an attribute which returns a template.

###### gck_object_get_template_async

Get an attribute template from the object. The `attr_type` must be for an attribute which returns a template.

###### gck_object_get_template_finish

Get the result of an operation to get attribute template from an object.

###### gck_object_hash

Create a hash value for the GckObject.

###### gck_object_set

Set PKCS#11 attributes on an object. This call may block for an indefinite period.

###### gck_object_set_async

Set PKCS#11 attributes on an object. This call will return immediately and completes asynchronously.

###### gck_object_set_finish

Get the status of the operation to set attributes on a PKCS#11 object, begun with gck_object_set_async().

###### gck_object_set_template

Set an attribute template on the object. The attr_type must be for an attribute which contains a template.

###### gck_object_set_template_async

Set an attribute template on the object. The attr_type must be for an attribute which contains a template.

###### gck_object_set_template_finish

Get the result of an operation to set attribute template on an object.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Gck.Object:handle

The raw PKCS11 handle for this object.

###### Gck.Object:module

The GckModule that this object belongs to.

###### Gck.Object:session

The PKCS11 session to make calls on when this object needs to perform operations on itself.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GckObjectClass {
      GObjectClass parent;

    }

The class for a `GckObject`.

If the `attribute_types` field is set by a derived class, then the a `GckEnumerator` which has been setup using `gck_enumerator_set_object_type()` with this derived type will retrieve these attributes when enumerating. In this case the class must implement an ‘attributes’ property of boxed type `GCK_TYPE_ATTRIBUTES`.

###### Class members

`parent: GObjectClass`

  Derived from this.