massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / cryptography / cryptography / hazmat / primitives / ciphers / __init__.pyi
1 from abc import ABCMeta, abstractmethod
2
3 from cryptography.hazmat.backends.interfaces import CipherBackend
4 from cryptography.hazmat.primitives.ciphers.modes import Mode
5
6 class AEADCipherContext(metaclass=ABCMeta):
7     @abstractmethod
8     def authenticate_additional_data(self, data: bytes) -> None: ...
9
10 class AEADDecryptionContext(metaclass=ABCMeta):
11     @abstractmethod
12     def finalize_with_tag(self, tag: bytes) -> bytes: ...
13
14 class AEADEncryptionContext(metaclass=ABCMeta):
15     @property
16     @abstractmethod
17     def tag(self) -> bytes: ...
18
19 class BlockCipherAlgorithm(metaclass=ABCMeta):
20     @property
21     @abstractmethod
22     def block_size(self) -> int: ...
23
24 class Cipher(object):
25     def __init__(self, algorithm: CipherAlgorithm, mode: Mode | None, backend: CipherBackend | None = ...) -> None: ...
26     def decryptor(self) -> CipherContext: ...
27     def encryptor(self) -> CipherContext: ...
28
29 class CipherAlgorithm(metaclass=ABCMeta):
30     @property
31     @abstractmethod
32     def key_size(self) -> int: ...
33     @property
34     @abstractmethod
35     def name(self) -> str: ...
36
37 class CipherContext(metaclass=ABCMeta):
38     @abstractmethod
39     def finalize(self) -> bytes: ...
40     @abstractmethod
41     def update(self, data: bytes) -> bytes: ...
42     @abstractmethod
43     def update_into(self, data: bytes, buf: bytearray) -> int: ...