Fix TypeError during data decryption (#3833)

This commit is contained in:
AliRezaBeigy 2022-09-24 12:50:02 +03:30 committed by GitHub
parent dd51aea4db
commit 9110f9a4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,7 +143,7 @@ class MTProtoState:
msg_key = body[8:24]
aes_key, aes_iv = self._calc_key(self.auth_key.key, msg_key, False)
body = AES.decrypt_ige(body[24:], aes_key, aes_iv)
body = AES.decrypt_ige(bytes(body[24:]), aes_key, aes_iv)
# https://core.telegram.org/mtproto/security_guidelines
# Sections "checking sha256 hash" and "message length"