pub trait KeyExchanger {
    fn name<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn generate_request<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        payload: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn handle_response<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        response: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn is_complete<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn finalize<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<CompletedKeyExchange>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; }
Expand description

A trait implemented by both Initiator and Responder peers.

Required Methods§

Return key exchange unique name.

Generate request that should be sent to the other party.

Handle response from other party and return payload.

Returns true if the key exchange process is complete.

Return the data and keys needed for channels. Key exchange must be completed prior to calling this function.

Implementors§