Revert "Update tgcrypto function names"

This reverts commit a5979a3
This commit is contained in:
Dan 2018-09-17 16:53:21 +02:00
parent d2d4f55673
commit 0f0e757f4c

View File

@ -30,19 +30,19 @@ try:
# TODO: Use new tgcrypto function names # TODO: Use new tgcrypto function names
@classmethod @classmethod
def ige256_encrypt(cls, data: bytes, key: bytes, iv: bytes) -> bytes: def ige256_encrypt(cls, data: bytes, key: bytes, iv: bytes) -> bytes:
return tgcrypto.ige256_encrypt(data, key, iv) return tgcrypto.ige_encrypt(data, key, iv)
@classmethod @classmethod
def ige256_decrypt(cls, data: bytes, key: bytes, iv: bytes) -> bytes: def ige256_decrypt(cls, data: bytes, key: bytes, iv: bytes) -> bytes:
return tgcrypto.ige256_decrypt(data, key, iv) return tgcrypto.ige_decrypt(data, key, iv)
@staticmethod @staticmethod
def ctr256_encrypt(data: bytes, key: bytes, iv: bytearray, state: bytearray = None) -> bytes: def ctr256_encrypt(data: bytes, key: bytes, iv: bytearray, state: bytearray = None) -> bytes:
return tgcrypto.ctr256_encrypt(data, key, iv, state or bytearray(1)) return tgcrypto.ctr_encrypt(data, key, iv, state or bytearray(1))
@staticmethod @staticmethod
def ctr256_decrypt(data: bytes, key: bytes, iv: bytearray, state: bytearray = None) -> bytes: def ctr256_decrypt(data: bytes, key: bytes, iv: bytearray, state: bytearray = None) -> bytes:
return tgcrypto.ctr256_decrypt(data, key, iv, state or bytearray(1)) return tgcrypto.ctr_decrypt(data, key, iv, state or bytearray(1))
@staticmethod @staticmethod
def xor(a: bytes, b: bytes) -> bytes: def xor(a: bytes, b: bytes) -> bytes: