예제 #1
0
        protected byte[] encryptHeader(ref byte[] header)
        {
            string dtKey = DateTime.UtcNow.ToString("yyyyMMddHH");

            rc4Cipher = new XRC4Cipher(dtKey);
            return(rc4Cipher.DoCipher(ref header));
        }
예제 #2
0
 public Server(Socket socket)
 {
     this.ClSocket  = socket;
     this.Buffer    = new byte[PacketStream.MaxBuffer];
     this.Data      = new PacketStream();
     this.InCipher  = new XRC4Cipher(Program.RC4Key);
     this.OutCipher = new XRC4Cipher(Program.RC4Key);
 }
예제 #3
0
파일: Client.cs 프로젝트: sunnyxie49/Portal
 public Client(Socket socket)
 {
     this.ClSocket  = socket;
     this.Ip        = ((IPEndPoint)socket.RemoteEndPoint).Address.ToString();
     this.Port      = ((IPEndPoint)socket.RemoteEndPoint).Port;
     this.Buffer    = new byte[PacketStream.MaxBuffer];
     this.Data      = new PacketStream();
     this.InCipher  = new XRC4Cipher(Program.RC4Key);
     this.OutCipher = new XRC4Cipher(Program.RC4Key);
 }