Add back auth key generation process

This commit is contained in:
Lonami Exo
2018-10-01 09:58:53 +02:00
parent 5edc2216c7
commit 3b1142aaca
3 changed files with 18 additions and 9 deletions

View File

@@ -28,6 +28,14 @@ class MTProtoState:
for all these is not a good idea as each need their own authkey, and
the concept of "copying" sessions with the unnecessary entities or
updates state for these connections doesn't make sense.
While it would be possible to have a `MTProtoPlainState` that does no
encryption so that it was usable through the `MTProtoLayer` and thus
avoid the need for a `MTProtoPlainSender`, the `MTProtoLayer` is more
focused to efficiency and this state is also more advanced (since it
supports gzipping and invoking after other message IDs). There are too
many methods that would be needed to make it convenient to use for the
authentication process, at which point the `MTProtoPlainSender` is better.
"""
def __init__(self, auth_key):
# Session IDs can be random on every connection