Skip to main content

Sealer

Trait Sealer 

Source
pub trait Sealer {
    // Required methods
    fn seal(
        &mut self,
        st: StreamType,
        seq: u32,
        pt: &[u8],
    ) -> Result<Vec<u8>, MlsError>;
    fn open(
        &mut self,
        st: StreamType,
        seq: u32,
        ct: &[u8],
    ) -> Result<Vec<u8>, MlsError>;
}
Expand description

Trait abstracting the AEAD seal / open operations.

Implemented for gbp_mls::MlsContext in this crate; tests typically implement a no-op identity sealer to exercise the FSM without standing up an MLS group.

Required Methods§

Source

fn seal( &mut self, st: StreamType, seq: u32, pt: &[u8], ) -> Result<Vec<u8>, MlsError>

Encrypts pt for the given stream and per-stream sequence number.

Source

fn open( &mut self, st: StreamType, seq: u32, ct: &[u8], ) -> Result<Vec<u8>, MlsError>

Decrypts ct for the given stream and per-stream sequence number.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§