aboutsummaryrefslogtreecommitdiff
path: root/frozen_deps/Cryptodome/Protocol/KDF.pyi
diff options
context:
space:
mode:
Diffstat (limited to 'frozen_deps/Cryptodome/Protocol/KDF.pyi')
-rw-r--r--frozen_deps/Cryptodome/Protocol/KDF.pyi20
1 files changed, 19 insertions, 1 deletions
diff --git a/frozen_deps/Cryptodome/Protocol/KDF.pyi b/frozen_deps/Cryptodome/Protocol/KDF.pyi
index fb004bf..745f019 100644
--- a/frozen_deps/Cryptodome/Protocol/KDF.pyi
+++ b/frozen_deps/Cryptodome/Protocol/KDF.pyi
@@ -1,7 +1,11 @@
from types import ModuleType
-from typing import Optional, Callable, Tuple, Union, Dict, Any
+from typing import Optional, Callable, Tuple, Union, Dict, Any, overload
+from typing_extensions import Literal
+
+Buffer=bytes|bytearray|memoryview
RNG = Callable[[int], bytes]
+PRF = Callable[[bytes, bytes], bytes]
def PBKDF1(password: str, salt: bytes, dkLen: int, count: Optional[int]=1000, hashAlgo: Optional[ModuleType]=None) -> bytes: ...
def PBKDF2(password: str, salt: bytes, dkLen: Optional[int]=16, count: Optional[int]=1000, prf: Optional[RNG]=None, hmac_hash_module: Optional[ModuleType]=None) -> bytes: ...
@@ -22,3 +26,17 @@ def _bcrypt_decode(data: bytes) -> bytes: ...
def _bcrypt_hash(password:bytes , cost: int, salt: bytes, constant:bytes, invert:bool) -> bytes: ...
def bcrypt(password: Union[bytes, str], cost: int, salt: Optional[bytes]=None) -> bytes: ...
def bcrypt_check(password: Union[bytes, str], bcrypt_hash: Union[bytes, bytearray, str]) -> None: ...
+
+@overload
+def SP800_108_Counter(master: Buffer,
+ key_len: int,
+ prf: PRF,
+ num_keys: Literal[None] = None,
+ label: Buffer = b'', context: Buffer = b'') -> bytes: ...
+
+@overload
+def SP800_108_Counter(master: Buffer,
+ key_len: int,
+ prf: PRF,
+ num_keys: int,
+ label: Buffer = b'', context: Buffer = b'') -> Tuple[bytes]: ...