### Namespace

# Secret – 1

Secret Service D-Bus client library

Version | 0.21.4
Authors | Stef Walter, Daiki Ueno, and Niels De Graef
License | LGPL-2.1-or-later
Website | https://gnome.pages.gitlab.gnome.org/libsecret/
Source | https://gitlab.gnome.org/GNOME/libsecret

#### Build

C headers | `libsecret/secret.h`
pkg-config files | `libsecret-1`

#### Dependencies

GLib—2.0 | The base type system library
| Browse documentation
GObject—2.0 | The base type system library
| Browse documentation

#### Additional documentation

- Using libsecret
- Simple API
- C Examples
- Javascript Examples
- Python Examples
- Vala Examples
- Extending file backend to use a TPM
- Migrating from libgnome-keyring
- Classes Hierarchy

#### Classes

Collection | A proxy object representing a collection of secrets in the Secret Service. unstable since: 1
Item | A secret item. unstable since: 1
Prompt | A prompt in the Service. unstable since: 1
Service | A proxy object representing the Secret Service. unstable since: 1

#### Interfaces

Backend | `SecretBackend` represents a backend implementation of password storage. since: 0.19.0
Retrievable | A read-only view of a secret item in the Secret Service. since: 0.19.0

#### Structs

Schema | Represents a set of attributes that are stored with an item. unstable since: 1
SchemaAttribute | An attribute in a `SecretSchema`. unstable since: 1
Value | A value containing a secret. unstable since: 1

#### Enumerations

BackendFlags | Flags which determine which parts of the `SecretBackend` are initialized. since: 0.19.0
Error | Errors returned by the Secret Service. unstable since: 1
SchemaAttributeType | The type of an attribute in a `SecretSchema`. unstable since: 1
SchemaType | Different types of schemas for storing secrets, intended for use with `secret_get_schema()`. since: 0.18.6

#### Bitfields

CollectionCreateFlags | Flags for `secret_collection_create()`. unstable since: 1
CollectionFlags | Flags which determine which parts of the `SecretCollection` proxy are initialized. unstable since: 1
ItemCreateFlags | Flags for `secret_item_create()`. unstable since: 1
ItemFlags | Flags which determine which parts of the `SecretItem` proxy are initialized. unstable since: 1
SchemaFlags | Flags for a `SecretSchema` definition. unstable since: 1
SearchFlags | Various flags to be used with `secret_service_search()` and `secret_service_search_sync()`. unstable since: 1
ServiceFlags | Flags which determine which parts of the `SecretService` proxy are initialized during a `secret_service_get()` or `secret_service_open()` operation. unstable since: 1

#### Functions

attributes_build | Build up a hash table of attribute values. unstable since: 1
attributes_buildv | Build up a hash table of attribute values. unstable since: 1
attributes_validate | Check if attributes are valid according to the provided schema. unstable since: 1
get_schema | Get a secret storage schema of the given `type`. since: 0.18.6
password_clear | Clear unlocked matching passwords from the secret service. unstable since: 1
password_clear_finish | Finish an asynchronous operation to remove passwords from the secret service. unstable since: 1
password_clear_sync | Remove unlocked matching passwords from the secret service. unstable since: 1
password_clearv | Remove unlocked matching passwords from the secret service. unstable since: 1
password_clearv_sync | Remove unlocked matching passwords from the secret service. unstable since: 1
password_free | Clear the memory used by a password, and then free it. unstable since: 1
password_lookup | Lookup a password in the secret service. unstable since: 1
password_lookup_binary_finish | Finish an asynchronous operation to lookup a password in the secret service. since: 0.19.0
password_lookup_binary_sync | Lookup a password in the secret service. since: 0.19.0
password_lookup_finish | Finish an asynchronous operation to lookup a password in the secret service. unstable since: 1
password_lookup_nonpageable_finish | Finish an asynchronous operation to lookup a password in the secret service. unstable since: 1
password_lookup_nonpageable_sync | Lookup a password in the secret service. unstable since: 1
password_lookup_sync | Lookup a password in the secret service. unstable since: 1
password_lookupv | Lookup a password in the secret service. unstable since: 1
password_lookupv_binary_sync | Lookup a password in the secret service. since: 0.19.0
password_lookupv_nonpageable_sync | Lookup a password in the secret service. unstable since: 1
password_lookupv_sync | Lookup a password in the secret service. unstable since: 1
password_search | Search for items in the secret service. since: 0.19.0
password_search_finish | Finish an asynchronous operation to search for items in the secret service. since: 0.19.0
password_search_sync | Search for items in the secret service. since: 0.19.0
password_searchv | Search for items in the secret service. since: 0.19.0
password_searchv_sync | Search for items in the secret service. since: 0.19.0
password_store | Store a password in the secret service. unstable since: 1
password_store_binary | Store a password in the secret service. since: 0.19.0
password_store_binary_sync | Store a password in the secret service. since: 0.19.0
password_store_finish | Finish asynchronous operation to store a password in the secret service. unstable since: 1
password_store_sync | Store a password in the secret service. unstable since: 1
password_storev | Store a password in the secret service. unstable since: 1
password_storev_binary | Store a password in the secret service. since: 0.19.0
password_storev_binary_sync | Store a password in the secret service. since: 0.19.0
password_storev_sync | Store a password in the secret service. unstable since: 1
password_wipe | Clear the memory used by a password. unstable since: 1

#### Function Macros

CHECK_VERSION | Returns `TRUE` if using libsecret is newer than or equal to the given version. unstable since: 1

#### Constants

BACKEND_EXTENSION_POINT_NAME | Extension point for the secret backend. unstable since: 1
COLLECTION_DEFAULT | An alias to the default collection. unstable since: 1
COLLECTION_SESSION | An alias to the session collection, which will be cleared when the user ends the session. unstable since: 1
MAJOR_VERSION | The major version of libsecret. unstable since: 1
MICRO_VERSION | The micro version of libsecret. unstable since: 1
MINOR_VERSION | The minor version of libsecret. unstable since: 1