Skip to content

Struct crypto::voice::Header

zaun_community_protocol::crypto::voice::Header · Struct

pub struct Header { … }

An SFrame header (RFC 9605 the protocol).

The key id.

The counter.

pub fn encode_into(&self, out: &mut Vec<u8>)

Appends the minimal encoding.

pub fn to_bytes(&self) -> Vec<u8>

The minimal encoding.

pub fn parse(frame: &[u8]) -> Result<(Self, usize), VoiceError>

Parses the header at the start of frame; returns it and its length. Non-minimal encodings are rejected, so each header has exactly one encoding.

VoiceError::Header.

Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

Full rustdoc page