cher-nov / cryptg

Official Telethon extension to provide much faster cryptography for Telegram API requests.
https://pypi.org/project/cryptg/
Creative Commons Zero v1.0 Universal
75 stars 24 forks source link

cryptg make bytes mutable #10

Closed NotStatilko closed 3 years ago

NotStatilko commented 3 years ago

That's was really fun to debug. How about to add note about this in docstring?


from cryptg import encrypt_ige

key, iv, text = b'k'*32, b'iv'*16, b't'*16

print(text) # b'tttttttttttttttt'
encrypt_ige(text,key,iv)
print(text) # b'\x8a\xea7\x9d\xabM\xd1cLO\x98\xf4"\x0b\x05b'
Lonami commented 3 years ago

Sorry about the "fun" times. This was definitely an issue in 0.2. However, it is no longer an issue in the master branch, so I will close this ticket. Thanks for the report.