2016-09-24 15:38:26 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using TeleSharp.TL;
|
|
|
|
|
namespace TeleSharp.TL.Account
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
[TLObject(-2037289493)]
|
2016-09-24 15:38:26 +02:00
|
|
|
public class TLPasswordInputSettings : TLObject
|
|
|
|
|
{
|
|
|
|
|
public override int Constructor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return -2037289493;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
public int flags { get; set; }
|
|
|
|
|
public byte[] new_salt { get; set; }
|
|
|
|
|
public byte[] new_password_hash { get; set; }
|
|
|
|
|
public string hint { get; set; }
|
|
|
|
|
public string email { get; set; }
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
public void ComputeFlags()
|
|
|
|
|
{
|
|
|
|
|
flags = 0;
|
|
|
|
|
flags = new_salt != null ? (flags | 1) : (flags & ~1);
|
|
|
|
|
flags = new_password_hash != null ? (flags | 1) : (flags & ~1);
|
|
|
|
|
flags = hint != null ? (flags | 1) : (flags & ~1);
|
|
|
|
|
flags = email != null ? (flags | 2) : (flags & ~2);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
}
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
public override void DeserializeBody(BinaryReader br)
|
|
|
|
|
{
|
|
|
|
|
flags = br.ReadInt32();
|
2017-07-20 04:07:24 +02:00
|
|
|
if ((flags & 1) != 0)
|
|
|
|
|
new_salt = BytesUtil.Deserialize(br);
|
|
|
|
|
else
|
|
|
|
|
new_salt = null;
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
if ((flags & 1) != 0)
|
|
|
|
|
new_password_hash = BytesUtil.Deserialize(br);
|
|
|
|
|
else
|
|
|
|
|
new_password_hash = null;
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +02:00
|
|
|
if ((flags & 1) != 0)
|
|
|
|
|
hint = StringUtil.Deserialize(br);
|
|
|
|
|
else
|
|
|
|
|
hint = null;
|
2016-09-24 15:38:26 +02:00
|
|
|
|
2017-07-20 04:07:24 +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)
|
|
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
bw.Write(Constructor);
|
2016-09-24 15:38:26 +02:00
|
|
|
ComputeFlags();
|
2017-07-20 04:07:24 +02:00
|
|
|
bw.Write(flags);
|
|
|
|
|
if ((flags & 1) != 0)
|
Fix V3029 warnings from PVS-Studio Static Analyzer
Warnings with low priority:
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 69, 71.
TLPasswordInputSettings.cs 69
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 71, 73.
TLPasswordInputSettings.cs 71
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 91, 93.
TLPaymentForm.cs 91
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 120, 122.
TLBotInlineResult.cs 120
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 124, 126.
TLBotInlineResult.cs 124
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 124, 126.
TLChannelFull.cs 124
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 120, 122.
TLInputBotInlineResult.cs 120
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 124, 126.
TLInputBotInlineResult.cs 124
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 154, 156. TLWebPage.cs
154
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 158, 160. TLWebPage.cs
158
2017-10-29 15:45:52 +01:00
|
|
|
{
|
2017-07-20 04:07:24 +02:00
|
|
|
BytesUtil.Serialize(new_salt, bw);
|
|
|
|
|
BytesUtil.Serialize(new_password_hash, bw);
|
|
|
|
|
StringUtil.Serialize(hint, bw);
|
Fix V3029 warnings from PVS-Studio Static Analyzer
Warnings with low priority:
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 69, 71.
TLPasswordInputSettings.cs 69
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 71, 73.
TLPasswordInputSettings.cs 71
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 91, 93.
TLPaymentForm.cs 91
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 120, 122.
TLBotInlineResult.cs 120
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 124, 126.
TLBotInlineResult.cs 124
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 124, 126.
TLChannelFull.cs 124
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 120, 122.
TLInputBotInlineResult.cs 120
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 124, 126.
TLInputBotInlineResult.cs 124
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 154, 156. TLWebPage.cs
154
V3029 The conditional expressions of the 'if' statements situated
alongside each other are identical. Check lines: 158, 160. TLWebPage.cs
158
2017-10-29 15:45:52 +01:00
|
|
|
}
|
2017-07-20 04:07:24 +02:00
|
|
|
if ((flags & 2) != 0)
|
|
|
|
|
StringUtil.Serialize(email, bw);
|
2016-09-24 15:38:26 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|