mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Use more straightforward calls of hashlib.sha1/sha256
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
from hashlib import sha1
|
||||
|
||||
from .. import helpers as utils
|
||||
from ..utils import BinaryWriter
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class RSAServerKey:
|
||||
|
||||
with BinaryWriter() as writer:
|
||||
# Write SHA
|
||||
writer.write(utils.sha1(data[offset:offset + length]))
|
||||
writer.write(sha1(data[offset:offset + length]).digest())
|
||||
# Write data
|
||||
writer.write(data[offset:offset + length])
|
||||
# Add padding if required
|
||||
|
Reference in New Issue
Block a user