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).
Fields
Section titled “Fields”suite: u8
Section titled “suite: u8”2: the voice suite.
community_id: CommunityId
Section titled “community_id: CommunityId”3: the community.
channel_id: ChannelId
Section titled “channel_id: ChannelId”4: the voice channel.
sender_member: MemberId
Section titled “sender_member: MemberId”5: the sender; its member key signs.
sender_session: VoiceSessionId
Section titled “sender_session: VoiceSessionId”6: the sender’s voice session.
epoch: u32
Section titled “epoch: u32”7: the epoch.
kid: u64
Section titled “kid: u64”8: the SFrame KID of this epoch.
recipients: Vec<RecipientEntry>
Section titled “recipients: Vec<RecipientEntry>”9: the recipients, at most MAX_RECIPIENTS, each once.
created_at: u64
Section titled “created_at: u64”10: ms since the epoch.
Methods
Section titled “Methods”sign_epoch
Section titled “sign_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.
Errors
Section titled “Errors”VoiceError::Recipients for too many or repeated recipients; VoiceError::Signed.
verify
Section titled “verify”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.
Errors
Section titled “Errors”VoiceError::Length, VoiceError::Decode, VoiceError::Signed (checked
before the body is decoded) or VoiceError::Mismatch.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Decode, Encode, Eq, PartialEq, SignedObject, StructuralPartialEq