pub struct Handshake {
pub version: u8,
pub client_id: String,
pub nonce: [u8; 32],
pub proof: [u8; 32],
}Expand description
Sent by the client immediately after the TLS handshake completes.
Contains a random nonce and an HMAC-SHA256 proof computed over the nonce and the pre-shared key, authenticating the client to the server.
Fields§
§version: u8Protocol version the client speaks.
client_id: StringHuman-readable client identifier (hostname or user-supplied name).
nonce: [u8; 32]32-byte random nonce generated fresh for this connection.
proof: [u8; 32]HMAC-SHA256(nonce || “pwr-auth-v1”, PSK).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Handshake
impl<'de> Deserialize<'de> for Handshake
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Handshake
impl RefUnwindSafe for Handshake
impl Send for Handshake
impl Sync for Handshake
impl Unpin for Handshake
impl UnsafeUnpin for Handshake
impl UnwindSafe for Handshake
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