|
27 | 27 |
|
28 | 28 |
|
29 | 29 | class AES: |
| 30 | + # TODO: Use new tgcrypto function names |
30 | 31 | @classmethod |
31 | 32 | 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) |
33 | 34 |
|
34 | 35 | @classmethod |
35 | 36 | 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) |
37 | 38 |
|
38 | 39 | @staticmethod |
39 | 40 | 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)) |
41 | 42 |
|
42 | 43 | @staticmethod |
43 | 44 | 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)) |
45 | 46 |
|
46 | 47 | @staticmethod |
47 | 48 | def xor(a: bytes, b: bytes) -> bytes: |
|
0 commit comments