Struct secret_handshake::crypto::Server
[−]
[src]
#[repr(C)]pub struct Server<'a> { /* fields omitted */ }
The struct used in the C code to perform the server side of a handshake.
Methods
impl<'a> Server<'a>
[src]
fn new(
app: *const [u8; 32],
pub_: *const [u8; 32],
sec: *const [u8; 64],
eph_pub: *const [u8; 32],
eph_sec: *const [u8; 32]
) -> Server<'a>
[src]
app: *const [u8; 32],
pub_: *const [u8; 32],
sec: *const [u8; 64],
eph_pub: *const [u8; 32],
eph_sec: *const [u8; 32]
) -> Server<'a>
Creates and initializes a new Server
.
fn verify_msg1(&mut self, challenge: &[u8; 64]) -> bool
[src]
Verifies the given client challenge
and updates the server state.
fn create_msg2(&mut self, challenge: &mut [u8; 64])
[src]
Writes the server challenge into challenge
and updates the server state.
fn verify_msg3(&mut self, auth: &[u8; 112]) -> bool
[src]
Verifies the given client auth
entication and updates the server state.
fn create_msg4(&mut self, ack: *mut [u8; 80])
[src]
Writes the server acknowledgement into ack
and updates the server state.
fn outcome(&mut self, outcome: &mut Outcome)
[src]
Computes the outcome of the handshake and writes it into outcome
.
fn clean(&mut self)
[src]
Zeros out all sensitive data in the Server
.
unsafe fn client_longterm_pub(&self) -> [u8; 32]
[src]
Returns the longterm public key of the client. This will return uninitialized memory if called before the server verified msg3.
Trait Implementations
impl<'a> Drop for Server<'a>
[src]
Zero out all sensitive data when going out of scope.