예제 #1
0
 public NetworkConnection StartEncryption(HandshakeKeyContainer pair)
 {
     return(pool.Change(connection, new NetworkConfiguration
     {
         Encryptor = new HandshakeConnectionToEncryptor(pair.Local),
         Decryptor = new HandshakeConnectionToDecryptor(pair.Remote)
     }));
 }
예제 #2
0
        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();
        }