1 from abc import ABCMeta, abstractmethod
3 from cryptography.hazmat.backends.interfaces import HashBackend
5 class HashAlgorithm(metaclass=ABCMeta):
9 class HashContext(metaclass=ABCMeta):
10 algorithm: HashAlgorithm
12 def copy(self) -> HashContext: ...
14 def finalize(self) -> bytes: ...
16 def update(self, data: bytes) -> None: ...
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): ...
33 class SHAKE128(HashAlgorithm):
34 def __init__(self, digest_size: int) -> None: ...
36 class SHAKE256(HashAlgorithm):
37 def __init__(self, digest_size: int) -> None: ...
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: ...