TLSharp/TeleSharp.TL/TL/Auth/TLRequestBindTempAuthKey.cs

43 lines
1.1 KiB
C#
Raw Normal View History

2016-09-24 15:38:26 +02:00
using System.IO;
2017-04-13 08:38:01 +02:00
2016-09-24 15:38:26 +02:00
namespace TeleSharp.TL.Auth
{
2017-04-13 08:38:01 +02:00
[TLObject(-841733627)]
2016-09-24 15:38:26 +02:00
public class TLRequestBindTempAuthKey : TLMethod
{
2017-04-13 08:38:01 +02:00
public override int Constructor => -841733627;
2016-09-24 15:38:26 +02:00
2017-04-13 08:38:01 +02:00
public long perm_auth_key_id { get; set; }
public long nonce { get; set; }
public int expires_at { get; set; }
public byte[] encrypted_message { get; set; }
public bool Response { get; set; }
2016-09-24 15:38:26 +02:00
2017-04-13 08:38:01 +02:00
public void ComputeFlags()
{
}
2016-09-24 15:38:26 +02:00
public override void DeserializeBody(BinaryReader br)
{
perm_auth_key_id = br.ReadInt64();
2017-04-13 08:38:01 +02:00
nonce = br.ReadInt64();
expires_at = br.ReadInt32();
encrypted_message = BytesUtil.Deserialize(br);
2016-09-24 15:38:26 +02:00
}
public override void SerializeBody(BinaryWriter bw)
{
2017-04-13 08:38:01 +02:00
bw.Write(Constructor);
2016-09-24 15:38:26 +02:00
bw.Write(perm_auth_key_id);
2017-04-13 08:38:01 +02:00
bw.Write(nonce);
bw.Write(expires_at);
BytesUtil.Serialize(encrypted_message, bw);
2016-09-24 15:38:26 +02:00
}
2017-04-13 08:38:01 +02:00
public override void deserializeResponse(BinaryReader br)
{
Response = BoolUtil.Deserialize(br);
}
2016-09-24 15:38:26 +02:00
}
2017-04-13 08:38:01 +02:00
}