massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / cryptography / cryptography / hazmat / primitives / hashes.pyi
1 from abc import ABCMeta, abstractmethod
2
3 from cryptography.hazmat.backends.interfaces import HashBackend
4
5 class HashAlgorithm(metaclass=ABCMeta):
6     digest_size: int
7     name: str
8
9 class HashContext(metaclass=ABCMeta):
10     algorithm: HashAlgorithm
11     @abstractmethod
12     def copy(self) -> HashContext: ...
13     @abstractmethod
14     def finalize(self) -> bytes: ...
15     @abstractmethod
16     def update(self, data: bytes) -> None: ...
17
18 class BLAKE2b(HashAlgorithm): ...
19 class BLAKE2s(HashAlgorithm): ...
20 class MD5(HashAlgorithm): ...
21 class SHA1(HashAlgorithm): ...
22 class SHA224(HashAlgorithm): ...
23 class SHA256(HashAlgorithm): ...
24 class SHA384(HashAlgorithm): ...
25 class SHA3_224(HashAlgorithm): ...
26 class SHA3_256(HashAlgorithm): ...
27 class SHA3_384(HashAlgorithm): ...
28 class SHA3_512(HashAlgorithm): ...
29 class SHA512(HashAlgorithm): ...
30 class SHA512_224(HashAlgorithm): ...
31 class SHA512_256(HashAlgorithm): ...
32
33 class SHAKE128(HashAlgorithm):
34     def __init__(self, digest_size: int) -> None: ...
35
36 class SHAKE256(HashAlgorithm):
37     def __init__(self, digest_size: int) -> None: ...
38
39 class Hash(HashContext):
40     def __init__(self, algorithm: HashAlgorithm, backend: HashBackend | None = ...): ...
41     def copy(self) -> Hash: ...
42     def finalize(self) -> bytes: ...
43     def update(self, data: bytes) -> None: ...