mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Move utils.calc_msg_key into auth_key (cyclic imports py3.4)
This commit is contained in:
@@ -4,7 +4,6 @@ This module holds the AuthKey class.
|
||||
import struct
|
||||
from hashlib import sha1
|
||||
|
||||
from .. import helpers as utils
|
||||
from ..extensions import BinaryReader
|
||||
|
||||
|
||||
@@ -36,4 +35,6 @@ class AuthKey:
|
||||
"""
|
||||
new_nonce = new_nonce.to_bytes(32, 'little', signed=True)
|
||||
data = new_nonce + struct.pack('<BQ', number, self.aux_hash)
|
||||
return utils.calc_msg_key(data)
|
||||
|
||||
# Calculates the message key from the given data
|
||||
return sha1(data).digest()[4:20]
|
||||
|
Reference in New Issue
Block a user