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§
Sourcefn seal(
&mut self,
st: StreamType,
seq: SequenceNo,
pt: &[u8],
) -> Result<Vec<u8>, MlsError>
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.
Sourcefn open(
&mut self,
st: StreamType,
seq: SequenceNo,
ct: &[u8],
) -> Result<Vec<u8>, MlsError>
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.