diff --git a/crates/matrix-sdk-crypto-ffi/src/machine.rs b/crates/matrix-sdk-crypto-ffi/src/machine.rs index 65bf6f51e..b895bb9c6 100644 --- a/crates/matrix-sdk-crypto-ffi/src/machine.rs +++ b/crates/matrix-sdk-crypto-ffi/src/machine.rs @@ -1330,7 +1330,7 @@ impl OlmMachine { Ok(self.runtime.block_on(self.inner.backup_machine().room_key_counts())?.into()) } - /// Store the recovery key in the cryptostore. + /// Store the recovery key in the crypto store. /// /// This is useful if the client wants to support gossiping of the backup /// key. diff --git a/crates/matrix-sdk-crypto/src/backups/mod.rs b/crates/matrix-sdk-crypto/src/backups/mod.rs index 15494822a..10ebca631 100644 --- a/crates/matrix-sdk-crypto/src/backups/mod.rs +++ b/crates/matrix-sdk-crypto/src/backups/mod.rs @@ -220,7 +220,7 @@ impl BackupMachine { Ok(()) } - /// Store the recovery key in the cryptostore. + /// Store the recovery key in the crypto store. /// /// This is useful if the client wants to support gossiping of the backup /// key. diff --git a/crates/matrix-sdk-crypto/src/identities/device.rs b/crates/matrix-sdk-crypto/src/identities/device.rs index 58d15be65..96fa116f7 100644 --- a/crates/matrix-sdk-crypto/src/identities/device.rs +++ b/crates/matrix-sdk-crypto/src/identities/device.rs @@ -456,8 +456,8 @@ impl ReadOnlyDevice { /// Set the trust state of the device to the given state. /// - /// Note: This should only done in the cryptostore where the trust state can - /// be stored. + /// Note: This should only done in the crypto store where the trust state + /// can be stored. pub(crate) fn set_trust_state(&self, state: LocalTrust) { self.trust_state.store(state, Ordering::Relaxed) } diff --git a/crates/matrix-sdk-crypto/src/store/mod.rs b/crates/matrix-sdk-crypto/src/store/mod.rs index 890202f70..c82fe9345 100644 --- a/crates/matrix-sdk-crypto/src/store/mod.rs +++ b/crates/matrix-sdk-crypto/src/store/mod.rs @@ -639,8 +639,8 @@ impl CryptoStoreError { } } -/// Trait abstracting a store that the `OlmMachine` uses to store cryptographic -/// keys. +/// Represents a store that the `OlmMachine` uses to store E2EE data (such as +/// cryptographic keys). #[cfg_attr(target_arch = "wasm32", async_trait(?Send))] #[cfg_attr(not(target_arch = "wasm32"), async_trait)] pub trait CryptoStore: AsyncTraitDeps { diff --git a/crates/matrix-sdk-sled/src/cryptostore.rs b/crates/matrix-sdk-sled/src/cryptostore.rs index 646a5dc57..b9119240c 100644 --- a/crates/matrix-sdk-sled/src/cryptostore.rs +++ b/crates/matrix-sdk-sled/src/cryptostore.rs @@ -205,7 +205,7 @@ impl std::fmt::Debug for SledStore { } impl SledStore { - /// Open the sled based cryptostore at the given path using the given + /// Open the sled-based crypto store at the given path using the given /// passphrase to encrypt private data. pub fn open_with_passphrase( path: impl AsRef, @@ -224,7 +224,7 @@ impl SledStore { SledStore::open_helper(db, Some(path), store_cipher) } - /// Create a sled based cryptostore using the given sled database. + /// Create a sled-based crypto store using the given sled database. /// The given passphrase will be used to encrypt private data. pub fn open_with_database( db: Db, diff --git a/crates/matrix-sdk/README.md b/crates/matrix-sdk/README.md index fa7af4118..c0376c32c 100644 --- a/crates/matrix-sdk/README.md +++ b/crates/matrix-sdk/README.md @@ -59,19 +59,19 @@ More examples can be found in the [examples] directory. The following crate feature flags are available: -| Feature | Default | Description | -| ------------------- | :-----: | --------------------------------------------------------------------- | -| `anyhow` | No | Better logging for event handlers that return `anyhow::Result` | -| `e2e-encryption` | Yes | Enable End-to-end encryption support | -| `eyre` | No | Better logging for event handlers that return `eyre::Result` | -| `image-proc` | No | Enables image processing to generate thumbnails | -| `image-rayon` | No | Enables faster image processing | -| `markdown` | No | Support to send Markdown-formatted messages | -| `qrcode` | Yes | QR code verification support | -| `sled` | Yes | Persistent storage of state and E2EE-Data using sled (if `e2e-encryption` is activated) -| `indexeddb` | No | Persistent storage of state and E2EE-Data for browsers using indexeddb (if `e2e-encryption` is activated) -| `socks` | No | Enables SOCKS support in the default HTTP client, [`reqwest`] | -| `sso-login` | No | Enables SSO login with a local HTTP server | +| Feature | Default | Description | +| ------------------- | :-----: | -------------------------------------------------------------------------------------------------------------------------- | +| `anyhow` | No | Better logging for event handlers that return `anyhow::Result` | +| `e2e-encryption` | Yes | End-to-end encryption (E2EE) support | +| `eyre` | No | Better logging for event handlers that return `eyre::Result` | +| `image-proc` | No | Image processing for generating thumbnails | +| `image-rayon` | No | Enables faster image processing | +| `markdown` | No | Support for sending Markdown-formatted messages | +| `qrcode` | Yes | QR code verification support | +| `sled` | Yes | Persistent storage of state and E2EE data (optionally, if feature `e2e-encryption` is enabled), via Sled | +| `indexeddb` | No | Persistent storage of state and E2EE data (optionally, if feature `e2e-encryption` is enabled) for browsers, via IndexedDB | +| `socks` | No | SOCKS support in the default HTTP client, [`reqwest`] | +| `sso-login` | No | Support for SSO login with a local HTTP server | [`reqwest`]: https://docs.rs/reqwest/0.11.5/reqwest/index.html diff --git a/crates/matrix-sdk/src/error.rs b/crates/matrix-sdk/src/error.rs index 5e1b678b9..4ddf286df 100644 --- a/crates/matrix-sdk/src/error.rs +++ b/crates/matrix-sdk/src/error.rs @@ -198,9 +198,9 @@ pub enum RoomKeyImportError { #[error(transparent)] SerdeJson(#[from] JsonError), - /// The cryptostore isn't yet open, logging in is required to open the - /// cryptostore. - #[error("The cryptostore hasn't been yet opened, can't import yet.")] + /// The crypto store isn't yet open. Logging in is required to open the + /// crypto store. + #[error("The crypto store hasn't been yet opened, can't import yet.")] StoreClosed, /// An IO error happened. diff --git a/crates/matrix-sdk/src/store.rs b/crates/matrix-sdk/src/store.rs index c99665341..0fcba9f1f 100644 --- a/crates/matrix-sdk/src/store.rs +++ b/crates/matrix-sdk/src/store.rs @@ -16,12 +16,12 @@ //! The re-exports present here depend on the store-related features that are //! enabled: //! -//! 1. `sled` provides a `StateStore`, and a `CryptoStore` for encryption data -//! if `e2e-encryption` is enabled. This is the default persistent store -//! implementation for non-WebAssembly targets. -//! 2. `indexeddb`, too, provides a `StateStore` and a `CryptoStore` if -//! `encryption` is also enabled. This is the default persistent store -//! implementation for WebAssembly targets. +//! 1. The `sled` feature provides a `StateStore` for storing state and +//! a `CryptoStore` for E2EE data (if `e2e-encryption` is enabled). This is +//! the default persistent store implementation for non-WebAssembly targets. +//! 2. The `indexeddb` feature also provides a `StateStore` for storing state +//! and a `CryptoStore` (if `e2e-encryption` is enabled). This is the default +//! persistent store implementation for WebAssembly targets. //! //! Both options provide a `make_store_config` convenience method to create a //! [`StoreConfig`] for [`ClientBuilder::store_config()`].