Skip to content

Struct crypto::voice::SenderKeys

zaun_community_protocol::crypto::voice::SenderKeys · Struct

pub struct SenderKeys { … }

The signed statement of one sender’s epoch (see the module table).

2: the voice suite.

3: the community.

4: the voice channel.

5: the sender; its member key signs.

6: the sender’s voice session.

7: the epoch.

8: the SFrame KID of this epoch.

9: the recipients, at most MAX_RECIPIENTS, each once.

10: ms since the epoch.

pub fn sign_epoch(member_key: &SecretKey, ctx: &WrapContext, recipients: Vec<RecipientEntry>, created_at: u64) -> Result<SignedSenderKeys, VoiceError>

Signs a sender’s epoch over the wrapped keys it made.

VoiceError::Recipients for too many or repeated recipients; VoiceError::Signed.

pub fn verify(wire: &[u8], sender_key: &PublicKey, expected: &SenderKeysExpectation) -> Result<SignedSenderKeys, VoiceError>

Verifies a sender-keys message from the wire under the sender’s member key.

VoiceError::Length, VoiceError::Decode, VoiceError::Signed (checked before the body is decoded) or VoiceError::Mismatch.

Clone, Debug, Decode, Encode, Eq, PartialEq, SignedObject, StructuralPartialEq

Full rustdoc page