Exemple #1
0
        public void Read(TLBinaryReader from, byte[] authKey)
        {
            AuthKeyId = from.ReadInt64();
            MsgKey    = from.ReadBytes(16);

            var data1 = from.ReadBytes((int)from.BaseStream.Length - (int)from.BaseStream.Position);

            var decryptKeyIV = Utils.GetDecryptKeyIV(authKey, MsgKey);
            var data2        = Utils.AesIge(data1, decryptKeyIV.Item1, decryptKeyIV.Item2, false);

            using (var reader = new TLBinaryReader(data2))
            {
                Query = new TLTransportMessage();
                Query.Read(reader);
            }

            //from.ReadUInt64();
            //MsgId = from.ReadUInt64();

            //var length = from.ReadUInt32();
            //var innerType = (TLType)from.ReadUInt32();
            //Inner = TLFactory.Read<T>(from, innerType);
        }
Exemple #2
0
 public override void Read(TLBinaryReader from)
 {
     AuthKeyId = from.ReadInt64();
     MsgKey    = from.ReadBytes(16);
 }