예제 #1
0
        public void Deserialize(redBuffer Buffer, SteamClient Client)
        {
            Byte[] IV            = new Byte[24];
            Byte[] Key           = new Byte[24];
            Byte[] EncryptedData = new Byte[1];

            // Read the packet.
            Buffer.ReadUInt64(ref _TransactionID);
            Buffer.ReadUInt64(ref _XUID);
            Buffer.ReadUInt64(ref _Username);
            Buffer.ReadUInt32(ref _Type);
            Buffer.ReadUInt32(ref _Seed);
            Buffer.ReadUInt32(ref _IP);
            Buffer.ReadBlob(ref EncryptedData);

            // Generate the IV and key.
            IV  = SteamCrypto.CalculateIV(_Seed);
            Key = SteamCrypto.CalculateIV(Client.SessionID);
            Array.Resize <Byte>(ref IV, 8);

            // Create a new buffer and encrypt the data.
            _Data = new Byte[EncryptedData.Length];
            _Data = SteamCrypto.Decrypt(EncryptedData, Key, IV);
        }
예제 #2
0
        public bool Serialize(ref redBuffer Buffer)
        {
            try
            {
                Buffer.ReadUInt64(ref IM.FromXUID);
                Buffer.ReadUInt64(ref IM.ToXUID);
                Buffer.ReadUInt32(ref IM.TimeStamp);
                Buffer.ReadBlob(ref IM.Message);
            }
            catch (Exception e)
            {
                Log.Error(e.Message);
                return false;
            }

            return true;
        }
예제 #3
0
        public bool Serialize(ref redBuffer Buffer)
        {
            try
            {
                Buffer.ReadUInt64(ref IM.FromXUID);
                Buffer.ReadUInt64(ref IM.ToXUID);
                Buffer.ReadUInt32(ref IM.TimeStamp);
                Buffer.ReadBlob(ref IM.Message);
            }
            catch (Exception e)
            {
                Log.Error(e.Message);
                return(false);
            }

            return(true);
        }
예제 #4
0
        public void Deserialize(redBuffer Buffer, SteamClient Client)
        {
            Byte[] IV = new Byte[24];
            Byte[] Key = new Byte[24];
            Byte[] EncryptedData = new Byte[1];

            // Read the packet.
            Buffer.ReadUInt64(ref _TransactionID);
            Buffer.ReadUInt64(ref _XUID);
            Buffer.ReadUInt64(ref _Username);
            Buffer.ReadUInt32(ref _Type);
            Buffer.ReadUInt32(ref _Seed);
            Buffer.ReadUInt32(ref _IP);
            Buffer.ReadBlob(ref EncryptedData);

            // Generate the IV and key.
            IV = SteamCrypto.CalculateIV(_Seed);
            Key = SteamCrypto.CalculateIV(Client.SessionID);
            Array.Resize<Byte>(ref IV, 8);

            // Create a new buffer and encrypt the data.
            _Data = new Byte[EncryptedData.Length];
            _Data = SteamCrypto.Decrypt(EncryptedData, Key, IV);
        }