Exemplo n.º 1
0
        private void OnReceive(BufferData data)
        {
            var packet = new ClientKeyPacket();

            packet.Read(data.GetReader());

            DHKeyExchange.GenerateServerK(PrivateKey, packet.B, K);

            var key = new byte[64];

            K.WriteToBigEndian(key, 0, key.Length);

            GameCryptManager.Initialize(Data, key);

            Socket.Send(new ClientKeyOkPacket());

            Cleanup();

            Manager.ExchangeDone(this);
        }