private static void Connected() { FConsole.WriteLine("Socket Connected! Logging in..."); Client.Diffie = new DiffieHellman(256).GenerateRequest(); var msgDh = MsgDH.Create(Client.Diffie.ToString()); Client.Send(msgDh); }
public static void Process(ClientSocket clientSocket, MsgDH packet) { var b = packet.GetPayload(); clientSocket.Diffie = new DiffieHellman(256).GenerateResponse(Encoding.ASCII.GetString(b)); clientSocket.Send(MsgDH.Create(clientSocket.Diffie.ToString())); clientSocket.Crypto = new Crypto(clientSocket.Diffie.Key); }