Skip to main content

Module file

Module file 

Source
Expand description

File backend implementation that can be backed by the Secret portal.

use oo7::{Secret, file::UnlockedKeyring};

let keyring = UnlockedKeyring::load("default.keyring", Secret::text("some_text")).await?;
keyring
    .create_item("My Label", &[("account", "alice")], "My Password", true)
    .await?;

let items = keyring.search_items(&[("account", "alice")]).await?;
assert_eq!(items[0].secret(), oo7::Secret::blob("My Password"));

keyring.delete(&[("account", "alice")]).await?;

Modules§

apiunstable
GNOME Keyring file format low level API.

Structs§

InvalidItemError
All information that is available about an invalid (not decryptable) Item
LockedItem
A locked variant of UnlockedItem
LockedKeyring
A locked keyring that requires a secret to unlock.
UnlockedItem
An item stored in the file backend.
UnlockedKeyring
File backed keyring.

Enums§

Error
File backend specific errors.
Item
Keyring
WeakKeyError
Details about why an encryption key is consider too weak for writing

Type Aliases§

ItemDefinition
Definition for batch item creation: (label, attributes, secret, replace)