Skip to content

Struct crypto::voice::FrameOpener

zaun_community_protocol::crypto::voice::FrameOpener · Struct

pub struct FrameOpener { … }

Opens one sender’s frames for one KID, rejecting replays.

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

An opener for base under kid (decryption only).

pub const fn kid(&self) -> u64

The KID this opener accepts.

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

Opens a sealed frame. The counter is recorded only once the frame authenticates.

VoiceError::Header, VoiceError::UnknownKid for another KID, VoiceError::Replay or VoiceError::Open.

Debug

Full rustdoc page