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.
Methods
Section titled “Methods”from_bytes
Section titled “from_bytes”pub fn from_bytes(bytes: &[u8]) -> Result<Self, VoiceError>Parses the wire form.
Errors
Section titled “Errors”VoiceError::Length unless exactly WRAPPED_KEY_LEN bytes.
as_bytes
Section titled “as_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.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Eq, PartialEq, StructuralPartialEq