pub struct ServerPreamble<'a> {
pub identity_public_key: &'a str,
pub exchange_public_key: &'a [u8],
pub signature: &'a [u8],
pub challenge: &'a [u8],
}Expand description
Serves as the server’s response to the preamble, containing its public key, its signature of the client’s challenge and a challenge. The server signs the client’s challenge to prove its identity.
Fields§
§identity_public_key: &'a strThe server’s identity public key (base64 encoded Ed25519 key)
exchange_public_key: &'a [u8]The server’s ephemeral public key for the key exchange
signature: &'a [u8]The server’s signature of the client’s challenge
challenge: &'a [u8]A random challenge for the client to sign
Trait Implementations§
Source§impl<'__de, 'a, __Context> BorrowDecode<'__de, __Context> for ServerPreamble<'a>where
'__de: 'a,
impl<'__de, 'a, __Context> BorrowDecode<'__de, __Context> for ServerPreamble<'a>where
'__de: 'a,
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<'a> Clone for ServerPreamble<'a>
impl<'a> Clone for ServerPreamble<'a>
Source§fn clone(&self) -> ServerPreamble<'a>
fn clone(&self) -> ServerPreamble<'a>
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<'a> Debug for ServerPreamble<'a>
impl<'a> Debug for ServerPreamble<'a>
Source§impl<'a> Encode for ServerPreamble<'a>
impl<'a> Encode for ServerPreamble<'a>
Source§impl<'a> PartialEq for ServerPreamble<'a>
impl<'a> PartialEq for ServerPreamble<'a>
impl<'a> Eq for ServerPreamble<'a>
impl<'a> StructuralPartialEq for ServerPreamble<'a>
Auto Trait Implementations§
impl<'a> Freeze for ServerPreamble<'a>
impl<'a> RefUnwindSafe for ServerPreamble<'a>
impl<'a> Send for ServerPreamble<'a>
impl<'a> Sync for ServerPreamble<'a>
impl<'a> Unpin for ServerPreamble<'a>
impl<'a> UnwindSafe for ServerPreamble<'a>
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