mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Several fixes to authenticator, added more unit tests
Some fixes include, in more detail: - Using little over big endianess in some parts - Flagging all the constructor numbers as unsigned - Fixed bugs with factorizer - Implemented TLSharp's RSA
This commit is contained in:
0
parser/__init__.py
Normal file → Executable file
0
parser/__init__.py
Normal file → Executable file
0
parser/source_builder.py
Normal file → Executable file
0
parser/source_builder.py
Normal file → Executable file
4
parser/tl_generator.py
Normal file → Executable file
4
parser/tl_generator.py
Normal file → Executable file
@@ -113,7 +113,7 @@ def generate_tlobjects(scheme_file):
|
||||
|
||||
# Write the on_send(self, writer) function
|
||||
builder.writeln('def on_send(self, writer):')
|
||||
builder.writeln("writer.write_int({}) # {}'s constructor ID"
|
||||
builder.writeln("writer.write_int({}, signed=False) # {}'s constructor ID"
|
||||
.format(hex(tlobject.id), tlobject.name))
|
||||
|
||||
for arg in tlobject.args:
|
||||
@@ -214,7 +214,7 @@ def write_onsend_code(builder, arg, args, name=None):
|
||||
builder.writeln('if {} is not None:'.format(name))
|
||||
|
||||
if arg.is_vector:
|
||||
builder.writeln("writer.write_int(0x1cb5c415) # Vector's constructor ID")
|
||||
builder.writeln("writer.write_int(0x1cb5c415, signed=False) # Vector's constructor ID")
|
||||
builder.writeln('writer.write_int(len({}))'.format(name))
|
||||
builder.writeln('for {}_item in {}:'.format(arg.name, name))
|
||||
# Temporary disable .is_vector, not to enter this if again
|
||||
|
0
parser/tl_parser.py
Normal file → Executable file
0
parser/tl_parser.py
Normal file → Executable file
Reference in New Issue
Block a user