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.
Methods
Section titled “Methods”from_bytes
Section titled “from_bytes”pub fn from_bytes(bytes: &[u8]) -> Result<Self, VoiceError>Parses and validates the encoding (the ML-KEM-768 part must be canonical).
Errors
Section titled “Errors”VoiceError::PublicKey for an invalid key, VoiceError::Length for a wrong length.
as_bytes
Section titled “as_bytes”pub const fn as_bytes(&self) -> &[u8; 1216]The 1 216-byte encoding.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Eq, PartialEq, StructuralPartialEq