Skip to content

Struct crypto::voice::WrappedKey

zaun_community_protocol::crypto::voice::WrappedKey · Struct

pub struct WrappedKey(…)

A base key wrapped to one recipient: X-Wing enc ‖ AES-256-GCM ciphertext ‖ tag.

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

Parses the wire form.

VoiceError::Length unless exactly WRAPPED_KEY_LEN bytes.

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

The wire form.

pub fn hash(&self) -> [u8; 32]

SHA3-256 of the wire form, as signed in SenderKeys.

Clone, Debug, Eq, PartialEq, StructuralPartialEq

Full rustdoc page