Module matrix_sdk::encryption::secret_storage

source ·
Available on crate feature e2e-encryption only.
Expand description

Secret Storage Support

This submodule provides essential functionality for secret storage in compliance with the Matrix protocol specification.

Secret storage is a critical component that provides an encrypted key/value storage system. It leverages account data events stored on the Matrix homeserver to ensure secure and private storage of sensitive information.

For detailed information and usage guidelines, refer to the documentation of the SecretStore struct.

§Examples

use ruma::events::secret::request::SecretName;

// Open the store.
let secret_store = client
    .encryption()
    .secret_storage()
    .open_secret_store("It's a secret to everybody")
    .await?;

// Import the secrets.
secret_store.import_secrets().await?;

// Our own device should now be verified.
let device = client
    .encryption()
    .get_own_device()
    .await?
    .expect("We should be able to retrieve our own device");

assert!(device.is_cross_signed_by_owner());

Structs§

Enums§

Type Aliases§

  • Convenicence type alias for the secret-storage specific results.