Trait ockam_key_exchange_core::KeyExchanger [−][src]
pub trait KeyExchanger { fn name(&self) -> String; fn generate_request(&mut self, payload: &[u8]) -> Result<Vec<u8>>; fn handle_response(&mut self, response: &[u8]) -> Result<Vec<u8>>; fn is_complete(&self) -> bool; fn finalize(self) -> Result<CompletedKeyExchange>; }
Expand description
A trait implemented by both Initiator and Responder peers.
Required methods
Generate request that should be sent to the other party.
Handle response from other party and return payload.
fn is_complete(&self) -> bool
fn is_complete(&self) -> bool
Returns true if the key exchange process is complete.
fn finalize(self) -> Result<CompletedKeyExchange>
fn finalize(self) -> Result<CompletedKeyExchange>
Return the data and keys needed for channels. Key exchange must be completed prior to calling this function.