Skip to content

Struct crypto::voice::VoicePublicKey

zaun_community_protocol::crypto::voice::VoicePublicKey · Struct

pub struct VoicePublicKey { … }

An X-Wing encapsulation key (ML-KEM-768 ‖ X25519, 1 216 bytes), validated on parse.

pub fn from_bytes(bytes: &[u8]) -> Result<Self, VoiceError>

Parses and validates the encoding (the ML-KEM-768 part must be canonical).

VoiceError::PublicKey for an invalid key, VoiceError::Length for a wrong length.

pub const fn as_bytes(&self) -> &[u8; 1216]

The 1 216-byte encoding.

Clone, Debug, Eq, PartialEq, StructuralPartialEq

Full rustdoc page