Module oo7::portal

source ·
Expand description

File backend implementation backed by the Secret portal.

use std::collections::HashMap;

use oo7::portal::Keyring;

let keyring = Keyring::load_default().await?;
keyring
    .create_item(
        "My Label",
        &HashMap::from([("account", "alice")]),
        b"My Password",
        true,
    )
    .await?;

let items = keyring
    .search_items(&HashMap::from([("account", "alice")]))
    .await?;
assert_eq!(*items[0].secret(), b"My Password");

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

Modules§

  • apiunstable
    GNOME Keyring file format low level API.

Structs§

Enums§

  • File backend specific errors.
  • Details about why an encryption key is consider too weak for writing