1 from abc import ABCMeta, abstractmethod
3 from cryptography.hazmat.backends.interfaces import CipherBackend
4 from cryptography.hazmat.primitives.ciphers.modes import Mode
6 class AEADCipherContext(metaclass=ABCMeta):
8 def authenticate_additional_data(self, data: bytes) -> None: ...
10 class AEADDecryptionContext(metaclass=ABCMeta):
12 def finalize_with_tag(self, tag: bytes) -> bytes: ...
14 class AEADEncryptionContext(metaclass=ABCMeta):
17 def tag(self) -> bytes: ...
19 class BlockCipherAlgorithm(metaclass=ABCMeta):
22 def block_size(self) -> int: ...
25 def __init__(self, algorithm: CipherAlgorithm, mode: Mode | None, backend: CipherBackend | None = ...) -> None: ...
26 def decryptor(self) -> CipherContext: ...
27 def encryptor(self) -> CipherContext: ...
29 class CipherAlgorithm(metaclass=ABCMeta):
32 def key_size(self) -> int: ...
35 def name(self) -> str: ...
37 class CipherContext(metaclass=ABCMeta):
39 def finalize(self) -> bytes: ...
41 def update(self, data: bytes) -> bytes: ...
43 def update_into(self, data: bytes, buf: bytearray) -> int: ...