pub struct VoiceIdentity { /* private fields */ }Expand description
A voice session’s X-Wing key pair. The secret is the 32-byte X-Wing seed, zeroized on drop and never printed. It lives only as long as the voice session; it is never stored.
Implementations§
Source§impl VoiceIdentity
impl VoiceIdentity
Sourcepub fn generate() -> Result<Self, VoiceError>
pub fn generate() -> Result<Self, VoiceError>
Sourcepub fn from_seed(seed: &[u8; 32]) -> Result<Self, VoiceError>
pub fn from_seed(seed: &[u8; 32]) -> Result<Self, VoiceError>
The key pair of an X-Wing seed (the X-Wing decapsulation key, draft §5.2). Tests and
known-answer vectors only; real sessions use Self::generate.
§Errors
VoiceError::PublicKey if the derived public key does not re-parse (never expected).
Sourcepub const fn public_key(&self) -> &VoicePublicKey
pub const fn public_key(&self) -> &VoicePublicKey
The public half, published in the key package.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VoiceIdentity
impl RefUnwindSafe for VoiceIdentity
impl Send for VoiceIdentity
impl Sync for VoiceIdentity
impl Unpin for VoiceIdentity
impl UnsafeUnpin for VoiceIdentity
impl UnwindSafe for VoiceIdentity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more