server_secure_handshake_response

Function server_secure_handshake_response 

Source
pub fn server_secure_handshake_response(
    client_pub_key: [u8; 32],
    client_nonce: [u8; 16],
    client_timestamp: u64,
) -> Result<(ServerHandshakeState, Message)>
Expand description

Generates server response to client handshake initialization. Validates client timestamp, generates server key pair and nonce.

§Returns

A tuple of (new ServerHandshakeState, Message::SecureHandshakeResponse)

§Errors

Returns ProtocolError::HandshakeError if client timestamp is invalid or too old