2
0
mirror of https://github.com/esiur/esiur-dart.git synced 2026-04-03 17:58:21 +00:00

authorizedAccount

This commit is contained in:
2024-06-22 14:50:10 +03:00
parent 26794f08e7
commit 09c730ebc4
2 changed files with 23 additions and 3 deletions

View File

@@ -49,7 +49,8 @@ class IIPAuthPacket {
DC? challenge;
DC? asymetricEncryptionKey;
DC? sessionId;
DC? accountId;
TransmissionType? dataType;
int reference = 0;
@@ -298,7 +299,7 @@ class IIPAuthPacket {
} else if (event == IIPAuthPacketEvent.IndicationEstablished) {
if (_notEnough(offset, ends, 1))
if (_notEnough(offset, ends, 2))
return -_dataLengthNeeded;
var sessionLength = data[offset++];
@@ -310,6 +311,20 @@ class IIPAuthPacket {
offset += sessionLength;
if (_notEnough(offset, ends, 1))
return -_dataLengthNeeded;
var accountLength = data[offset++];
if (_notEnough(offset, ends, accountLength))
return -_dataLengthNeeded;
accountId = data.clip(offset, accountLength);
offset += accountLength;
} else if (event == IIPAuthPacketEvent.IAuthPlain ||
event == IIPAuthPacketEvent.IAuthHashed ||
event == IIPAuthPacketEvent.IAuthEncrypted) {