Trait libp2prs_core::pnet::Pnet [−][src]
Associated Types
type Output: Send[src]
Output after the upgrade has been successfully negotiated and the handshake performed.
Required methods
#[must_use]fn handshake<'async_trait>(
self,
socket: TSocket
) -> Pin<Box<dyn Future<Output = Result<Self::Output, PnetError>> + Send + 'async_trait>> where
Self: 'async_trait, [src]
self,
socket: TSocket
) -> Pin<Box<dyn Future<Output = Result<Self::Output, PnetError>> + Send + 'async_trait>> where
Self: 'async_trait,
Implementors
impl<TSocket> Pnet<TSocket> for PnetConfig where
TSocket: ConnectionInfo + SplittableReadWrite, [src]
TSocket: ConnectionInfo + SplittableReadWrite,
type Output = PnetOutput<TSocket>
fn handshake<'async_trait>(
self,
socket: TSocket
) -> Pin<Box<dyn Future<Output = Result<Self::Output, PnetError>> + Send + 'async_trait>> where
Self: 'async_trait, [src]
self,
socket: TSocket
) -> Pin<Box<dyn Future<Output = Result<Self::Output, PnetError>> + Send + 'async_trait>> where
Self: 'async_trait,
upgrade a connection to use pre shared key encryption.
the upgrade works by both sides exchanging 24 byte nonces and then encrypting subsequent traffic with XSalsa20