mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-08 07:56:55 -04:00
Merge pull request #621 from matrix-org/dkasak/doc-improvements2
Document `OlmDecryptionInfo` and make it `pub(crate)`.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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<OlmDecryptionInfo> {
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user