Skip to main content

Sealer

Trait Sealer 

Source
pub trait Sealer {
    // Required methods
    fn seal(
        &mut self,
        st: StreamType,
        seq: SequenceNo,
        pt: &[u8],
    ) -> Result<Vec<u8>, MlsError>;
    fn open(
        &mut self,
        st: StreamType,
        seq: SequenceNo,
        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: SequenceNo, 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: SequenceNo, 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".

Implementations on Foreign Types§

Source§

impl Sealer for MlsContext

Source§

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

Source§

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

Implementors§