public NetworkConnection StartEncryption(HandshakeKeyContainer pair) { return(pool.Change(connection, new NetworkConfiguration { Encryptor = new HandshakeConnectionToEncryptor(pair.Local), Decryptor = new HandshakeConnectionToDecryptor(pair.Remote) })); }
public HandshakeNegotiatorPassive(NetworkPool pool, NetworkConnection connection, HandshakeNegotiatorPassiveContext context, HandshakeNegotiatorHooks hooks) { this.context = context; this.hooks = hooks; this.connection = new HandshakeConnection(pool, connection, hooks); this.credentials = HandshakeCryptography.Generate(); this.keys = new HandshakeKeyContainer(); }