pycryptodome/lib/Crypto/Cipher/_mode_ccm.pyi

19 lines
1.1 KiB
Python
Raw Normal View History

from types import ModuleType
from typing import Any, Union, Tuple
__all__ = ['CcmMode']
class CcmMode(object):
block_size: int
def __init__(self, factory: ModuleType, key: Union[bytes, bytearray, memoryview], nonce: Union[bytes, bytearray, memoryview], mac_len: int, msg_len: int, assoc_len: int,
cipher_params: Any) -> None: ...
def update(self, assoc_data: Union[bytes, bytearray, memoryview]) -> CcmMode: ...
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: ...