Example #1
0
 public override byte[] ToBytes()
 {
     return(TLUtils.Combine(
                TLUtils.SignatureToBytes(Signature),
                PQ.ToBytes(),
                P.ToBytes(),
                Q.ToBytes(),
                Nonce.ToBytes(),
                ServerNonce.ToBytes(),
                NewNonce.ToBytes(),
                DCId.ToBytes()));
 }
Example #2
0
            public byte[] CalculateTmpAesIV()
            {
                var hash1 = SHA1.HashData(NonceServer.Concat(NewNonce).ToArray());
                var hash2 = SHA1.HashData(NewNonce.Concat(NewNonce).ToArray());

                return(hash1[^ 8..].Concat(hash2).Concat(NewNonce[0..4]).ToArray());
Example #3
0
            public byte[] CalculateTmpAesKey()
            {
                var hash1 = SHA1.HashData(NewNonce.Concat(NonceServer).ToArray());
                var hash2 = SHA1.HashData(NonceServer.Concat(NewNonce).ToArray());

                return(hash1.Concat(hash2[0..12]).ToArray());