### Class

# Gck Object

since: 2

#### 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.

Available since: 2

#### 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.

since: 2

#### Instance methods

###### gck_object_cache_lookup

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

since: 2

###### gck_object_cache_lookup_async

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

since: 2

###### gck_object_cache_lookup_finish

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

since: 2

###### gck_object_destroy

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

since: 2

###### gck_object_destroy_async

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

since: 2

###### gck_object_destroy_finish

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

since: 2

###### gck_object_equal

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

since: 2

###### gck_object_get

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

since: 2

###### 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.

since: 2

###### gck_object_get_data

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

since: 2

###### gck_object_get_data_async

Get the data for the specified attribute from the object.

since: 2

###### 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.

since: 2

###### 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.

since: 2

###### gck_object_get_finish

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

since: 2

###### gck_object_get_full

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

since: 2

###### gck_object_get_handle

Get the raw PKCS#11 handle of a GckObject.

since: 2

###### gck_object_get_module

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

since: 2

###### gck_object_get_session

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

since: 2

###### gck_object_get_template

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

since: 2

###### gck_object_get_template_async

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

since: 2

###### gck_object_get_template_finish

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

since: 2

###### gck_object_hash

Create a hash value for the GckObject.

since: 2

###### gck_object_set

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

since: 2

###### gck_object_set_async

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

since: 2

###### gck_object_set_finish

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

since: 2

###### gck_object_set_template

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

since: 2

###### gck_object_set_template_async

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

since: 2

###### gck_object_set_template_finish

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

since: 2

##### 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.

since: 2

###### Gck.Object:module

The GckModule that this object belongs to.

since: 2

###### Gck.Object:session

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

since: 2

#### 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.

since: 2.0

#### 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.