SagaMap.LoginSession.OnSendKey C# (CSharp) Method

OnSendKey() public method

public OnSendKey ( SagaMap p ) : void
p SagaMap
return void
        public void OnSendKey(SagaMap.Packets.Login.Get.SendKey p)
        {
            this.netIO.ClientKey = p.GetKey();

            byte[] tempServerKey = Encryption.GenerateKey();
            byte[] expandedServerKey = Encryption.GenerateDecExpKey(tempServerKey);

            SagaLib.Packets.Server.SendKey sendPacket = new SagaLib.Packets.Server.SendKey();
            this.SessionID = p.SessionID;
            sendPacket.SetKey(expandedServerKey);
            sendPacket.SetCollumns(4);
            sendPacket.SetRounds(10);
            sendPacket.SetDirection(2);
            this.netIO.SendPacket(sendPacket, this.SessionID);

            this.netIO.ServerKey = tempServerKey;
        }