pub struct EncryptedFileMeta {
pub megolm_session_id: String,
pub wrapped_key_b64: String,
pub nonce_b64: String,
pub content_hash: String,
}Expand description
Metadata for an encrypted file transfer, carried in FileOffer. The
ChaCha20-Poly1305 file key is Megolm-wrapped (wrapped_key_b64); the
content_hash is bound as AEAD associated data.
Fields§
§megolm_session_id: String§wrapped_key_b64: String§nonce_b64: String§content_hash: StringSHA-256 of the plaintext, hex-encoded. Bound as AEAD associated data so the (key, nonce, ciphertext) triple can’t be replayed against different content, and verified after decryption.
Trait Implementations§
Source§impl Clone for EncryptedFileMeta
impl Clone for EncryptedFileMeta
Source§fn clone(&self) -> EncryptedFileMeta
fn clone(&self) -> EncryptedFileMeta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncryptedFileMeta
impl Debug for EncryptedFileMeta
Source§impl<'de> Deserialize<'de> for EncryptedFileMeta
impl<'de> Deserialize<'de> for EncryptedFileMeta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EncryptedFileMeta
Source§impl PartialEq for EncryptedFileMeta
impl PartialEq for EncryptedFileMeta
Source§fn eq(&self, other: &EncryptedFileMeta) -> bool
fn eq(&self, other: &EncryptedFileMeta) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EncryptedFileMeta
impl Serialize for EncryptedFileMeta
impl StructuralPartialEq for EncryptedFileMeta
Auto Trait Implementations§
impl Freeze for EncryptedFileMeta
impl RefUnwindSafe for EncryptedFileMeta
impl Send for EncryptedFileMeta
impl Sync for EncryptedFileMeta
impl Unpin for EncryptedFileMeta
impl UnsafeUnpin for EncryptedFileMeta
impl UnwindSafe for EncryptedFileMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more