Skip to content

Struct crypto::voice::FrameSealer

zaun_community_protocol::crypto::voice::FrameSealer · Struct

pub struct FrameSealer { … }

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.

pub fn new(base: &SenderKey, kid: u64) -> Self

A sealer for base under kid. A base key is used by one sender only.

pub const fn kid(&self) -> u64

The KID frames are sealed under.

pub fn seal(&mut self, metadata: &[u8], frame: &[u8]) -> Result<Vec<u8>, VoiceError>

header ‖ AES-256-GCM(frame), authenticating the header and metadata.

VoiceError::Exhausted after FRAMES_PER_KEY frames.

Debug

Full rustdoc page