crypto: Add some more serialize/deserialize implementations

This commit is contained in:
Damir Jelić 2021-01-18 13:21:30 +01:00
parent 14575892bd
commit 5418c88775
2 changed files with 3 additions and 3 deletions

View file

@ -361,7 +361,7 @@ impl<'a> IntoIterator for &'a SelfSigningPubkey {
}
/// Enum over the different user identity types we can have.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum UserIdentities {
/// Our own user identity.
Own(OwnUserIdentity),
@ -567,7 +567,7 @@ impl UserIdentity {
///
/// This identity can verify other identities as well as devices belonging to
/// the identity.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OwnUserIdentity {
user_id: Arc<UserId>,
master_key: MasterPubkey,

View file

@ -100,7 +100,7 @@ pub struct OlmDecryptionInfo {
/// A hash of a succesfully decrypted Olm message.
///
/// Can be used to check if a message has been replayed to us.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OlmMessageHash {
/// The curve25519 key of the sender that sent us the Olm message.
pub sender_key: String,