mirror of
https://github.com/Legrandin/pycryptodome.git
synced 2025-12-08 05:19:46 +00:00
21 lines
1.1 KiB
Python
21 lines
1.1 KiB
Python
|
|
from types import ModuleType
|
||
|
|
from typing import Any, Union, Tuple
|
||
|
|
|
||
|
|
from Crypto.Hash.CMAC import CMAC
|
||
|
|
|
||
|
|
__all__ = ['EaxMode']
|
||
|
|
|
||
|
|
class EaxMode(object):
|
||
|
|
block_size: int
|
||
|
|
nonce: bytes
|
||
|
|
def __init__(self, factory: ModuleType, key: Union[bytes, bytearray, memoryview], nonce: Union[bytes, bytearray, memoryview], mac_len: int, cipher_params: Any) -> None: ...
|
||
|
|
def update(self, assoc_data: Union[bytes, bytearray, memoryview]) -> CMAC: ...
|
||
|
|
def encrypt(self, plaintext: Union[bytes, bytearray, memoryview]) -> bytes: ...
|
||
|
|
def decrypt(self, ciphertext: Union[bytes, bytearray, memoryview]) -> bytes: ...
|
||
|
|
def digest(self) -> bytes: ...
|
||
|
|
def hexdigest(self) -> str: ...
|
||
|
|
def verify(self, received_mac_tag: Union[bytes, bytearray, memoryview]) -> None: ...
|
||
|
|
def hexverify(self, hex_mac_tag: str) -> None: ...
|
||
|
|
def encrypt_and_digest(self, plaintext: Union[bytes, bytearray, memoryview]) -> Tuple[bytes, bytes]: ...
|
||
|
|
def decrypt_and_verify(self, ciphertext: Union[bytes, bytearray, memoryview], received_mac_tag: Union[bytes, bytearray, memoryview]) -> bytes: ...
|