Storing passwords and items: Libsecret Library Reference Manual

## Storing passwords and items

It's encouraged to use a SecretSchema when storing items and passwords.

By default most ways of storing an item will now overwrite another item with the same attributes in the same keyring. To manually control this behavior use the `secret_item_create()`.

Replacements for related libgnome-keyring functions and types are described below:

Table 3.

libgnome-keyring | libsecret
--- | ---
`GNOME_KEYRING_DEFAULT` | `SECRET_COLLECTION_DEFAULT`
`GNOME_KEYRING_SESSION` | `SECRET_COLLECTION_SESSION`
`gnome_keyring_store_password()` | `secret_password_store()`
`gnome_keyring_store_password_sync()` | `secret_password_store_sync()`
`gnome_keyring_set_network_password()` | `secret_password_store()` with `SECRET_SCHEMA_COMPAT_NETWORK` although this is not recommended for new uses.
`gnome_keyring_set_network_password_sync()` | `secret_password_store_sync()` with `SECRET_SCHEMA_COMPAT_NETWORK` although this is not recommended for new uses.
`gnome_keyring_item_create()` | `secret_item_create()`, although using `secret_password_store()` is simpler.
`gnome_keyring_item_create_sync()` | `secret_item_create()`, although using `secret_password_store_sync()` is simpler.