crypto: Add getters for the sender key in our sessions
parent
5418c88775
commit
629a8ee84f
|
@ -188,6 +188,11 @@ impl InboundGroupSession {
|
|||
.expect("Can't export at the first known index")
|
||||
}
|
||||
|
||||
/// Get the sender key that this session was received from.
|
||||
pub fn sender_key(&self) -> &str {
|
||||
&self.sender_key
|
||||
}
|
||||
|
||||
/// Export this session at the given message index.
|
||||
pub async fn export_at_index(&self, message_index: u32) -> Option<ExportedRoomKey> {
|
||||
let session_key =
|
||||
|
|
|
@ -77,6 +77,11 @@ impl Session {
|
|||
Ok(plaintext)
|
||||
}
|
||||
|
||||
/// Get the sender key that was used to establish this Session.
|
||||
pub fn sender_key(&self) -> &str {
|
||||
&self.sender_key
|
||||
}
|
||||
|
||||
/// Encrypt the given plaintext as a OlmMessage.
|
||||
///
|
||||
/// Returns the encrypted Olm message.
|
||||
|
|
Loading…
Reference in New Issue