mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Make more TLObject methods private
Even though raw API is somewhat necessary at times, these methods should remain implementation details.
This commit is contained in:
@@ -41,8 +41,8 @@ def _compute_fingerprint(key):
|
||||
:param key: the Crypto.RSA key.
|
||||
:return: its 8-bytes-long fingerprint.
|
||||
"""
|
||||
n = tlobject.TLObject.serialize_bytes(get_byte_array(key.n))
|
||||
e = tlobject.TLObject.serialize_bytes(get_byte_array(key.e))
|
||||
n = tlobject.TLObject._serialize_bytes(get_byte_array(key.n))
|
||||
e = tlobject.TLObject._serialize_bytes(get_byte_array(key.e))
|
||||
# Telegram uses the last 8 bytes as the fingerprint
|
||||
return struct.unpack('<q', sha1(n + e).digest()[-8:])[0]
|
||||
|
||||
|
Reference in New Issue
Block a user