mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-14 11:05:32 -04:00
feat(sdk): Return the Curve25519Public key type instead of a string (#3450)
This commit is contained in:
@@ -222,7 +222,7 @@ impl Encryption {
|
||||
/// Get the public curve25519 key of our own device in base64. This is
|
||||
/// usually what is called the identity key of the device.
|
||||
pub async fn curve25519_key(&self) -> Option<String> {
|
||||
self.inner.curve25519_key().await
|
||||
self.inner.curve25519_key().await.map(|k| k.to_base64())
|
||||
}
|
||||
|
||||
pub fn backup_state_listener(&self, listener: Box<dyn BackupStateListener>) -> Arc<TaskHandle> {
|
||||
|
||||
@@ -57,6 +57,7 @@ use ruma::{
|
||||
};
|
||||
use tokio::sync::RwLockReadGuard;
|
||||
use tracing::{debug, error, instrument, trace, warn};
|
||||
use vodozemac::Curve25519PublicKey;
|
||||
|
||||
use self::{
|
||||
backups::{types::BackupClientState, Backups},
|
||||
@@ -613,10 +614,9 @@ impl Encryption {
|
||||
self.client.olm_machine().await.as_ref().map(|o| o.identity_keys().ed25519.to_base64())
|
||||
}
|
||||
|
||||
/// Get the public curve25519 key of our own device in base64. This is
|
||||
/// usually what is called the identity key of the device.
|
||||
pub async fn curve25519_key(&self) -> Option<String> {
|
||||
self.client.olm_machine().await.as_ref().map(|o| o.identity_keys().curve25519.to_base64())
|
||||
/// Get the public Curve25519 key of our own device.
|
||||
pub async fn curve25519_key(&self) -> Option<Curve25519PublicKey> {
|
||||
self.client.olm_machine().await.as_ref().map(|o| o.identity_keys().curve25519)
|
||||
}
|
||||
|
||||
/// Get the status of the private cross signing keys.
|
||||
|
||||
Reference in New Issue
Block a user