Secret – 1
Description: Reference for Secret-1

### Namespace

# Secret – 1

Secret Service D-Bus client library

Version | 0.20.5
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.
Item | A secret item.
Prompt | A prompt in the Service.
Service | A proxy object representing the Secret Service.

#### 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.
SchemaAttribute | An attribute in a `SecretSchema`.
Value | A value containing a secret.

#### Enumerations

BackendFlags | Flags which determine which parts of the `SecretBackend` are initialized. since: 0.19.0
Error | Errors returned by the Secret Service.
SchemaAttributeType | The type of an attribute in a `SecretSchema`.
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()`.
CollectionFlags | Flags which determine which parts of the `SecretCollection` proxy are initialized.
ItemCreateFlags | Flags for `secret_item_create()`.
ItemFlags | Flags which determine which parts of the `SecretItem` proxy are initialized.
SchemaFlags | Flags for a `SecretSchema` definition.
SearchFlags | Various flags to be used with `secret_service_search()` and `secret_service_search_sync()`.
ServiceFlags | Flags which determine which parts of the `SecretService` proxy are initialized during a `secret_service_get()` or `secret_service_open()` operation.

#### Functions

attributes_build | Build up a hash table of attribute values.
attributes_buildv | Build up a hash table of attribute values.
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.
password_clear_finish | Finish an asynchronous operation to remove passwords from the secret service.
password_clear_sync | Remove unlocked matching passwords from the secret service.
password_clearv | Remove unlocked matching passwords from the secret service.
password_clearv_sync | Remove unlocked matching passwords from the secret service.
password_free | Clear the memory used by a password, and then free it.
password_lookup | Lookup a password in the secret service.
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.
password_lookup_nonpageable_finish | Finish an asynchronous operation to lookup a password in the secret service.
password_lookup_nonpageable_sync | Lookup a password in the secret service.
password_lookup_sync | Lookup a password in the secret service.
password_lookupv | Lookup a password in the secret service.
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.
password_lookupv_sync | Lookup a password in the secret service.
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.
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.
password_store_sync | Store a password in the secret service.
password_storev | Store a password in the secret service.
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.
password_wipe | Clear the memory used by a password.

#### Function Macros

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

#### Constants

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