Skip to main content

MlsProtocolExt

Trait MlsProtocolExt 

Source
pub trait MlsProtocolExt {
    // Required methods
    fn encrypt_message(
        &self,
        mls_manager: &MlsManager,
        recipient: &str,
        plaintext: &[u8],
    ) -> Result<String>;
    fn decrypt_message(
        &self,
        mls_manager: &MlsManager,
        encrypted_content: &str,
    ) -> Result<Option<Vec<u8>>>;
}
Expand description

Extension trait for integrating MLS with the protocol.

Required Methods§

Source

fn encrypt_message( &self, mls_manager: &MlsManager, recipient: &str, plaintext: &[u8], ) -> Result<String>

Encrypts a plaintext message for a recipient.

This wraps the plaintext in an MLS ciphertext suitable for transport.

Source

fn decrypt_message( &self, mls_manager: &MlsManager, encrypted_content: &str, ) -> Result<Option<Vec<u8>>>

Decrypts an encrypted message.

Returns the decrypted plaintext if successful.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§