Gck.Attributes¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gck.Attributes¶
A set of [struct`Attribute`] structures.
These attributes contain information about a PKCS11 object. Use [method`Object`.get] or [method`Object`.set] to set and retrieve attributes on an object.
- classmethod new()[source]¶
- Returns:
a reference to the new attributes array; when done with the array release it with
Gck.Attributes.unref
().- Return type:
Create a new empty
GckAttributes
array.
- at(index)[source]¶
- Parameters:
index (
int
) – The attribute index to retrieve.- Returns:
the specified attribute
- Return type:
Get attribute at the specified index in the attribute array.
Use [method`Attributes`.count] to determine how many attributes are in the array.
- contains(match)[source]¶
- Parameters:
match (
Gck.Attribute
) – The attribute to find- Returns:
True
if the attributes contain the attribute.- Return type:
Check whether the attributes contain a certain attribute.
- count()[source]¶
- Returns:
The number of contained attributes.
- Return type:
Get the number of attributes in this attribute array.
- find(attr_type)[source]¶
- Parameters:
attr_type (
int
) – The type of attribute to find.- Returns:
the first attribute found with the specified type, or
None
- Return type:
Find an attribute with the specified type in the array.
- find_boolean(attr_type)[source]¶
- Parameters:
attr_type (
int
) – The type of attribute to find.- Returns:
Whether a value was found or not.
- value:
The resulting
bool
value.
- Return type:
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.
- find_date(attr_type)[source]¶
- Parameters:
attr_type (
int
) – The type of attribute to find.- Returns:
Whether a value was found or not.
- value:
The resulting
GLib.Date
value.
- Return type:
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.
- find_string(attr_type)[source]¶
- Parameters:
attr_type (
int
) – The type of attribute to find.- Returns:
Whether a value was found or not.
- value:
The resulting string value.
- Return type:
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
GLib.free
().
- find_ulong(attr_type)[source]¶
- Parameters:
attr_type (
int
) – The type of attribute to find.- Returns:
Whether a value was found or not.
- value:
The resulting
int
value.
- Return type:
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.