mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2026-09-12 19:55:59 +00:00
Use more straightforward calls of hashlib.sha1/sha256
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from hashlib import sha1
|
||||
|
||||
from .. import helpers as utils
|
||||
from ..utils import BinaryReader, BinaryWriter
|
||||
|
||||
@@ -6,7 +8,7 @@ class AuthKey:
|
||||
def __init__(self, data):
|
||||
self.key = data
|
||||
|
||||
with BinaryReader(utils.sha1(self.key)) as reader:
|
||||
with BinaryReader(sha1(self.key).digest()) as reader:
|
||||
self.aux_hash = reader.read_long(signed=False)
|
||||
reader.read(4)
|
||||
self.key_id = reader.read_long(signed=False)
|
||||
|
||||
Reference in New Issue
Block a user