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.
Methods
Section titled “Methods”pub fn new(base: &SenderKey, kid: u64) -> SelfA sealer for base under kid. A base key is used by one sender only.
pub const fn kid(&self) -> u64The 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.
Errors
Section titled “Errors”VoiceError::Exhausted after FRAMES_PER_KEY frames.
Trait implementations
Section titled “Trait implementations”Debug