pub struct FrameSealer { /* private fields */ }Expand description
Seals this participant’s frames under one base key and KID. The counter starts at zero and
never repeats; after FRAMES_PER_KEY frames it refuses and the sender rekeys.
Implementations§
Source§impl FrameSealer
impl FrameSealer
Sourcepub fn new(base: &SenderKey, kid: u64) -> Self
pub fn new(base: &SenderKey, kid: u64) -> Self
A sealer for base under kid. A base key is used by one sender only.
Sourcepub fn seal(
&mut self,
metadata: &[u8],
frame: &[u8],
) -> Result<Vec<u8>, VoiceError>
pub fn seal( &mut self, metadata: &[u8], frame: &[u8], ) -> Result<Vec<u8>, VoiceError>
header ‖ AES-256-GCM(frame), authenticating the header and metadata.
§Errors
VoiceError::Exhausted after FRAMES_PER_KEY frames.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameSealer
impl RefUnwindSafe for FrameSealer
impl Send for FrameSealer
impl Sync for FrameSealer
impl Unpin for FrameSealer
impl UnsafeUnpin for FrameSealer
impl UnwindSafe for FrameSealer
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