Secret Attributes: Libsecret Library Reference Manual

## Secret Attributes Secret Attributes — secret attributes |

## Functions

GHashTable * | secret_attributes_build ()
GHashTable * | secret_attributes_buildv ()

## Includes

    #include <libsecret/secret.h>

## Description

Each item has a set of attributes, which are used to locate the item later. These are not stored or transferred in a secure manner. Each attribute has a string name and a string value. These attributes are represented by a GHashTable with string keys and values.

Use `secret_attributes_build()` to simply build up a set of attributes.

## Functions

### secret_attributes_build ()

    GHashTable *
    secret_attributes_build (const SecretSchema *schema,
                             ...);

Build up a hash table of attribute values.

The variable argument list should contain pairs of a) The attribute name as a null-terminated string, followed by b) attribute value, either a character string, an int number, or a gboolean value, as defined in the password `schema` . The list of attribtues should be terminated with a `NULL`.

[skip]

#### Parameters

schema | the schema for the attributes |
... | the attribute keys and values, terminated with `NULL` |

#### Returns

a new table of attributes, to be released with `g_hash_table_unref()`.

[transfer full][element-type utf8 utf8]

### secret_attributes_buildv ()

    GHashTable *
    secret_attributes_buildv (const SecretSchema *schema,
                              va_list va);

Build up a hash table of attribute values.

The variable argument list should contain pairs of a) The attribute name as a null-terminated string, followed by b) attribute value, either a character string, an int number, or a gboolean value, as defined in the password `schema` . The list of attribtues should be terminated with a `NULL`.

[skip]

#### Parameters

schema | the schema for the attributes |
va | the attribute keys and values, terminated with `NULL` |

#### Returns

a new table of attributes, to be released with `g_hash_table_unref()`.

[transfer full][element-type utf8 utf8]

## Types and Values