diff --git a/crates/matrix-sdk-crypto/src/machine.rs b/crates/matrix-sdk-crypto/src/machine.rs index df852ca3d..8ceda3c3e 100644 --- a/crates/matrix-sdk-crypto/src/machine.rs +++ b/crates/matrix-sdk-crypto/src/machine.rs @@ -741,11 +741,7 @@ impl OlmMachine { /// /// # Arguments /// - /// * `sender_key` - The sender (curve25519) key of the event sender. - /// - /// * `signing_key` - The signing (ed25519) key of the event sender. - /// - /// * `event` - The decrypted to-device event. + /// * `decrypted` - The decrypted event and some associated metadata. async fn handle_decrypted_to_device_event( &self, decrypted: &OlmDecryptionInfo, diff --git a/crates/matrix-sdk-crypto/src/olm/account.rs b/crates/matrix-sdk-crypto/src/olm/account.rs index fb9fa5157..dd79d594b 100644 --- a/crates/matrix-sdk-crypto/src/olm/account.rs +++ b/crates/matrix-sdk-crypto/src/olm/account.rs @@ -90,8 +90,13 @@ impl SessionType { } } +/// A struct witnessing a successful decryption of an Olm-encrypted to-device +/// event. +/// +/// Contains the decrypted event plaintext along with some associated metadata, +/// such as the identity (Curve25519) key of the to-device event sender. #[derive(Debug, Clone)] -pub struct OlmDecryptionInfo { +pub(crate) struct OlmDecryptionInfo { pub sender: OwnedUserId, pub session: SessionType, pub message_hash: OlmMessageHash, @@ -213,7 +218,7 @@ impl Account { } } - pub async fn decrypt_to_device_event( + pub(crate) async fn decrypt_to_device_event( &self, event: &ToDeviceRoomEncryptedEvent, ) -> OlmResult { @@ -1005,7 +1010,7 @@ impl ReadOnlyAccount { /// session failed. /// /// # Arguments - /// * `their_identity_key` - The other account's identitiy/curve25519 key. + /// * `their_identity_key` - The other account's identity/curve25519 key. /// /// * `message` - A pre-key Olm message that was sent to us by the other /// account.