pub struct HandshakeAuth {
pub identity_public_key: [u8; 32],
pub signature: [u8; 64],
}Expand description
Authentication payload attached to a handshake control message.
Fields§
§identity_public_key: [u8; 32]Claimed Ed25519 identity public key.
signature: [u8; 64]Ed25519 signature over the transcript message.
Implementations§
Source§impl HandshakeAuth
impl HandshakeAuth
Sourcepub fn sign(identity: &IdentityKeyPair, message: &[u8]) -> Self
pub fn sign(identity: &IdentityKeyPair, message: &[u8]) -> Self
Creates an authentication payload from a local identity and transcript message.
Sourcepub fn verify(&self, message: &[u8]) -> Result<(), CoreError>
pub fn verify(&self, message: &[u8]) -> Result<(), CoreError>
Verifies the authentication payload against the transcript message.
Sourcepub const fn encoded_len() -> usize
pub const fn encoded_len() -> usize
Returns encoded byte length without the auth-mode discriminator.
Trait Implementations§
Source§impl Clone for HandshakeAuth
impl Clone for HandshakeAuth
Source§fn clone(&self) -> HandshakeAuth
fn clone(&self) -> HandshakeAuth
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandshakeAuth
impl Debug for HandshakeAuth
Source§impl PartialEq for HandshakeAuth
impl PartialEq for HandshakeAuth
impl Eq for HandshakeAuth
impl StructuralPartialEq for HandshakeAuth
Auto Trait Implementations§
impl Freeze for HandshakeAuth
impl RefUnwindSafe for HandshakeAuth
impl Send for HandshakeAuth
impl Sync for HandshakeAuth
impl Unpin for HandshakeAuth
impl UnsafeUnpin for HandshakeAuth
impl UnwindSafe for HandshakeAuth
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