Skip to content

Commit b451ced

Browse files
committed
Revert back to previous tgcrypto function names
1 parent 28310cb commit b451ced

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

pyrogram/crypto/aes.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,22 @@
2727

2828

2929
class AES:
30+
# TODO: Use new tgcrypto function names
3031
@classmethod
3132
def ige256_encrypt(cls, data: bytes, key: bytes, iv: bytes) -> bytes:
32-
return tgcrypto.ige256_encrypt(data, key, iv)
33+
return tgcrypto.ige_encrypt(data, key, iv)
3334

3435
@classmethod
3536
def ige256_decrypt(cls, data: bytes, key: bytes, iv: bytes) -> bytes:
36-
return tgcrypto.ige256_decrypt(data, key, iv)
37+
return tgcrypto.ige_decrypt(data, key, iv)
3738

3839
@staticmethod
3940
def ctr256_encrypt(data: bytes, key: bytes, iv: bytearray, state: bytearray = None) -> bytes:
40-
return tgcrypto.ctr256_encrypt(data, key, iv, state or bytearray(1))
41+
return tgcrypto.ctr_encrypt(data, key, iv, state or bytearray(1))
4142

4243
@staticmethod
4344
def ctr256_decrypt(data: bytes, key: bytes, iv: bytearray, state: bytearray = None) -> bytes:
44-
return tgcrypto.ctr256_decrypt(data, key, iv, state or bytearray(1))
45+
return tgcrypto.ctr_decrypt(data, key, iv, state or bytearray(1))
4546

4647
@staticmethod
4748
def xor(a: bytes, b: bytes) -> bytes:

0 commit comments

Comments
 (0)