aboutsummaryrefslogtreecommitdiff
path: root/frozen_deps/Cryptodome/IO/_PBES.pyi
diff options
context:
space:
mode:
Diffstat (limited to 'frozen_deps/Cryptodome/IO/_PBES.pyi')
-rw-r--r--frozen_deps/Cryptodome/IO/_PBES.pyi15
1 files changed, 11 insertions, 4 deletions
diff --git a/frozen_deps/Cryptodome/IO/_PBES.pyi b/frozen_deps/Cryptodome/IO/_PBES.pyi
index a8a34ce..0673364 100644
--- a/frozen_deps/Cryptodome/IO/_PBES.pyi
+++ b/frozen_deps/Cryptodome/IO/_PBES.pyi
@@ -1,4 +1,5 @@
-from typing import Dict, Optional, Callable
+from typing import Optional, Callable, TypedDict
+from typing_extensions import NotRequired
class PbesError(ValueError):
...
@@ -7,13 +8,19 @@ class PBES1(object):
@staticmethod
def decrypt(data: bytes, passphrase: bytes) -> bytes: ...
+class ProtParams(TypedDict):
+ iteration_count: NotRequired[int]
+ salt_size: NotRequired[int]
+ block_size: NotRequired[int]
+ parallelization: NotRequired[int]
+
class PBES2(object):
@staticmethod
def encrypt(data: bytes,
passphrase: bytes,
- protection: str,
- prot_params: Optional[Dict] = ...,
- randfunc: Optional[Callable[[int],bytes]] = ...) -> bytes: ...
+ protection: str,
+ prot_params: Optional[ProtParams] = ...,
+ randfunc: Optional[Callable[[int],bytes]] = ...) -> bytes: ...
@staticmethod
def decrypt(data:bytes, passphrase: bytes) -> bytes: ...