TLSharp/TeleSharp.TL/TL/Account/TLPasswordInputSettings.cs

69 lines
1.7 KiB
C#
Raw Normal View History

2016-09-24 15:38:26 +02:00
using System.IO;
2017-12-20 12:06:31 +01:00
2016-09-24 15:38:26 +02:00
namespace TeleSharp.TL.Account
{
[TLObject(-2037289493)]
2016-09-24 15:38:26 +02:00
public class TLPasswordInputSettings : TLObject
{
public override int Constructor
{
get
{
return -2037289493;
}
}
2017-12-20 12:06:31 +01:00
public string Email { get; set; }
public int Flags { get; set; }
2017-12-20 12:06:31 +01:00
public string Hint { get; set; }
2016-09-24 15:38:26 +02:00
2017-12-20 12:06:31 +01:00
public byte[] NewPasswordHash { get; set; }
public byte[] NewSalt { get; set; }
2016-09-24 15:38:26 +02:00
public void ComputeFlags()
{
}
2016-09-24 15:38:26 +02:00
public override void DeserializeBody(BinaryReader br)
{
Flags = br.ReadInt32();
if ((Flags & 1) != 0)
NewSalt = BytesUtil.Deserialize(br);
else
NewSalt = null;
2016-09-24 15:38:26 +02:00
if ((Flags & 1) != 0)
NewPasswordHash = BytesUtil.Deserialize(br);
else
NewPasswordHash = null;
2016-09-24 15:38:26 +02:00
if ((Flags & 1) != 0)
Hint = StringUtil.Deserialize(br);
else
Hint = null;
2016-09-24 15:38:26 +02:00
if ((Flags & 2) != 0)
Email = StringUtil.Deserialize(br);
else
Email = null;
2016-09-24 15:38:26 +02:00
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
bw.Write(Flags);
if ((Flags & 1) != 0)
BytesUtil.Serialize(NewSalt, bw);
if ((Flags & 1) != 0)
BytesUtil.Serialize(NewPasswordHash, bw);
if ((Flags & 1) != 0)
StringUtil.Serialize(Hint, bw);
if ((Flags & 2) != 0)
StringUtil.Serialize(Email, bw);
2016-09-24 15:38:26 +02:00
}
}
}