Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/kms/__init__.pyi +6 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/kms/exceptions.pyi +17 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/kms/layer1.pyi +82 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/s3/keyfile.pyi +29 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/s3/multidelete.pyi +35 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/__init__.pyi +3 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/backends/__init__.pyi +6 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/backends/interfaces.pyi +196 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/__init__.pyi +0 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/__init__.pyi +0 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/binding.pyi +6 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/__init__.pyi +3 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/__init__.pyi +3 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dh.pyi +79 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dsa.pyi +79 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ec.pyi +196 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed25519.pyi +25 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed448.pyi +25 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/padding.pyi +27 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/rsa.pyi +83 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/utils.pyi +12 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x25519.pyi +23 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x448.pyi +23 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi +44 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/aead.pyi +22 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/algorithms.pyi +76 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/modes.pyi +94 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/cmac.pyi +11 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/constant_time.pyi +1 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/hashes.pyi +44 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/hmac.pyi +11 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/__init__.pyi +7 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/concatkdf.pyi +24 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/hkdf.pyi +22 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/kbkdf.pyi +30 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/pbkdf2.pyi +12 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/scrypt.pyi +9 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/x963kdf.pyi +12 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/keywrap.pyi +10 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/padding.pyi +17 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/poly1305.pyi +9 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization/__init__.pyi +63 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization/pkcs12.pyi +18 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/__init__.pyi +1 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/hotp.pyi +12 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/totp.pyi +18 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/x509/__init__.pyi +420 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/x509/extensions.pyi +22 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/x509/oid.pyi +106 -0
- temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/flask/json/__init__.pyi +19 -0
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/kms/__init__.pyi
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import List
|
2 |
+
|
3 |
+
import boto.regioninfo
|
4 |
+
|
5 |
+
def regions() -> List[boto.regioninfo.RegionInfo]: ...
|
6 |
+
def connect_to_region(region_name, **kw_params): ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/kms/exceptions.pyi
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from boto.exception import BotoServerError
|
2 |
+
|
3 |
+
class InvalidGrantTokenException(BotoServerError): ...
|
4 |
+
class DisabledException(BotoServerError): ...
|
5 |
+
class LimitExceededException(BotoServerError): ...
|
6 |
+
class DependencyTimeoutException(BotoServerError): ...
|
7 |
+
class InvalidMarkerException(BotoServerError): ...
|
8 |
+
class AlreadyExistsException(BotoServerError): ...
|
9 |
+
class InvalidCiphertextException(BotoServerError): ...
|
10 |
+
class KeyUnavailableException(BotoServerError): ...
|
11 |
+
class InvalidAliasNameException(BotoServerError): ...
|
12 |
+
class UnsupportedOperationException(BotoServerError): ...
|
13 |
+
class InvalidArnException(BotoServerError): ...
|
14 |
+
class KMSInternalException(BotoServerError): ...
|
15 |
+
class InvalidKeyUsageException(BotoServerError): ...
|
16 |
+
class MalformedPolicyDocumentException(BotoServerError): ...
|
17 |
+
class NotFoundException(BotoServerError): ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/kms/layer1.pyi
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any, Dict, List, Mapping, Optional, Type
|
2 |
+
|
3 |
+
from boto.connection import AWSQueryConnection
|
4 |
+
|
5 |
+
class KMSConnection(AWSQueryConnection):
|
6 |
+
APIVersion: str
|
7 |
+
DefaultRegionName: str
|
8 |
+
DefaultRegionEndpoint: str
|
9 |
+
ServiceName: str
|
10 |
+
TargetPrefix: str
|
11 |
+
ResponseError: Type[Exception]
|
12 |
+
region: Any
|
13 |
+
def __init__(self, **kwargs) -> None: ...
|
14 |
+
def create_alias(self, alias_name: str, target_key_id: str) -> Optional[Dict[str, Any]]: ...
|
15 |
+
def create_grant(
|
16 |
+
self,
|
17 |
+
key_id: str,
|
18 |
+
grantee_principal: str,
|
19 |
+
retiring_principal: Optional[str] = ...,
|
20 |
+
operations: Optional[List[str]] = ...,
|
21 |
+
constraints: Optional[Dict[str, Dict[str, str]]] = ...,
|
22 |
+
grant_tokens: Optional[List[str]] = ...,
|
23 |
+
) -> Optional[Dict[str, Any]]: ...
|
24 |
+
def create_key(
|
25 |
+
self, policy: Optional[str] = ..., description: Optional[str] = ..., key_usage: Optional[str] = ...
|
26 |
+
) -> Optional[Dict[str, Any]]: ...
|
27 |
+
def decrypt(
|
28 |
+
self,
|
29 |
+
ciphertext_blob: bytes,
|
30 |
+
encryption_context: Optional[Mapping[str, Any]] = ...,
|
31 |
+
grant_tokens: Optional[List[str]] = ...,
|
32 |
+
) -> Optional[Dict[str, Any]]: ...
|
33 |
+
def delete_alias(self, alias_name: str) -> Optional[Dict[str, Any]]: ...
|
34 |
+
def describe_key(self, key_id: str) -> Optional[Dict[str, Any]]: ...
|
35 |
+
def disable_key(self, key_id: str) -> Optional[Dict[str, Any]]: ...
|
36 |
+
def disable_key_rotation(self, key_id: str) -> Optional[Dict[str, Any]]: ...
|
37 |
+
def enable_key(self, key_id: str) -> Optional[Dict[str, Any]]: ...
|
38 |
+
def enable_key_rotation(self, key_id: str) -> Optional[Dict[str, Any]]: ...
|
39 |
+
def encrypt(
|
40 |
+
self,
|
41 |
+
key_id: str,
|
42 |
+
plaintext: bytes,
|
43 |
+
encryption_context: Optional[Mapping[str, Any]] = ...,
|
44 |
+
grant_tokens: Optional[List[str]] = ...,
|
45 |
+
) -> Optional[Dict[str, Any]]: ...
|
46 |
+
def generate_data_key(
|
47 |
+
self,
|
48 |
+
key_id: str,
|
49 |
+
encryption_context: Optional[Mapping[str, Any]] = ...,
|
50 |
+
number_of_bytes: Optional[int] = ...,
|
51 |
+
key_spec: Optional[str] = ...,
|
52 |
+
grant_tokens: Optional[List[str]] = ...,
|
53 |
+
) -> Optional[Dict[str, Any]]: ...
|
54 |
+
def generate_data_key_without_plaintext(
|
55 |
+
self,
|
56 |
+
key_id: str,
|
57 |
+
encryption_context: Optional[Mapping[str, Any]] = ...,
|
58 |
+
key_spec: Optional[str] = ...,
|
59 |
+
number_of_bytes: Optional[int] = ...,
|
60 |
+
grant_tokens: Optional[List[str]] = ...,
|
61 |
+
) -> Optional[Dict[str, Any]]: ...
|
62 |
+
def generate_random(self, number_of_bytes: Optional[int] = ...) -> Optional[Dict[str, Any]]: ...
|
63 |
+
def get_key_policy(self, key_id: str, policy_name: str) -> Optional[Dict[str, Any]]: ...
|
64 |
+
def get_key_rotation_status(self, key_id: str) -> Optional[Dict[str, Any]]: ...
|
65 |
+
def list_aliases(self, limit: Optional[int] = ..., marker: Optional[str] = ...) -> Optional[Dict[str, Any]]: ...
|
66 |
+
def list_grants(self, key_id: str, limit: Optional[int] = ..., marker: Optional[str] = ...) -> Optional[Dict[str, Any]]: ...
|
67 |
+
def list_key_policies(
|
68 |
+
self, key_id: str, limit: Optional[int] = ..., marker: Optional[str] = ...
|
69 |
+
) -> Optional[Dict[str, Any]]: ...
|
70 |
+
def list_keys(self, limit: Optional[int] = ..., marker: Optional[str] = ...) -> Optional[Dict[str, Any]]: ...
|
71 |
+
def put_key_policy(self, key_id: str, policy_name: str, policy: str) -> Optional[Dict[str, Any]]: ...
|
72 |
+
def re_encrypt(
|
73 |
+
self,
|
74 |
+
ciphertext_blob: bytes,
|
75 |
+
destination_key_id: str,
|
76 |
+
source_encryption_context: Optional[Mapping[str, Any]] = ...,
|
77 |
+
destination_encryption_context: Optional[Mapping[str, Any]] = ...,
|
78 |
+
grant_tokens: Optional[List[str]] = ...,
|
79 |
+
) -> Optional[Dict[str, Any]]: ...
|
80 |
+
def retire_grant(self, grant_token: str) -> Optional[Dict[str, Any]]: ...
|
81 |
+
def revoke_grant(self, key_id: str, grant_id: str) -> Optional[Dict[str, Any]]: ...
|
82 |
+
def update_key_description(self, key_id: str, description: str) -> Optional[Dict[str, Any]]: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/s3/keyfile.pyi
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any
|
2 |
+
|
3 |
+
class KeyFile:
|
4 |
+
key: Any
|
5 |
+
location: int
|
6 |
+
closed: bool
|
7 |
+
softspace: int
|
8 |
+
mode: str
|
9 |
+
encoding: str
|
10 |
+
errors: str
|
11 |
+
newlines: str
|
12 |
+
name: Any
|
13 |
+
def __init__(self, key) -> None: ...
|
14 |
+
def tell(self): ...
|
15 |
+
def seek(self, pos, whence: Any = ...): ...
|
16 |
+
def read(self, size): ...
|
17 |
+
def close(self): ...
|
18 |
+
def isatty(self): ...
|
19 |
+
def getkey(self): ...
|
20 |
+
def write(self, buf): ...
|
21 |
+
def fileno(self): ...
|
22 |
+
def flush(self): ...
|
23 |
+
def next(self): ...
|
24 |
+
def readinto(self): ...
|
25 |
+
def readline(self): ...
|
26 |
+
def readlines(self): ...
|
27 |
+
def truncate(self): ...
|
28 |
+
def writelines(self): ...
|
29 |
+
def xreadlines(self): ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/boto/s3/multidelete.pyi
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any, Optional
|
2 |
+
|
3 |
+
class Deleted:
|
4 |
+
key: Any
|
5 |
+
version_id: Any
|
6 |
+
delete_marker: Any
|
7 |
+
delete_marker_version_id: Any
|
8 |
+
def __init__(
|
9 |
+
self,
|
10 |
+
key: Optional[Any] = ...,
|
11 |
+
version_id: Optional[Any] = ...,
|
12 |
+
delete_marker: bool = ...,
|
13 |
+
delete_marker_version_id: Optional[Any] = ...,
|
14 |
+
) -> None: ...
|
15 |
+
def startElement(self, name, attrs, connection): ...
|
16 |
+
def endElement(self, name, value, connection): ...
|
17 |
+
|
18 |
+
class Error:
|
19 |
+
key: Any
|
20 |
+
version_id: Any
|
21 |
+
code: Any
|
22 |
+
message: Any
|
23 |
+
def __init__(
|
24 |
+
self, key: Optional[Any] = ..., version_id: Optional[Any] = ..., code: Optional[Any] = ..., message: Optional[Any] = ...
|
25 |
+
) -> None: ...
|
26 |
+
def startElement(self, name, attrs, connection): ...
|
27 |
+
def endElement(self, name, value, connection): ...
|
28 |
+
|
29 |
+
class MultiDeleteResult:
|
30 |
+
bucket: Any
|
31 |
+
deleted: Any
|
32 |
+
errors: Any
|
33 |
+
def __init__(self, bucket: Optional[Any] = ...) -> None: ...
|
34 |
+
def startElement(self, name, attrs, connection): ...
|
35 |
+
def endElement(self, name, value, connection): ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/__init__.pyi
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any
|
2 |
+
|
3 |
+
def __getattr__(name: str) -> Any: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/backends/__init__.pyi
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any
|
2 |
+
|
3 |
+
def default_backend() -> Any: ...
|
4 |
+
|
5 |
+
# TODO: add some backends
|
6 |
+
def __getattr__(name: str) -> Any: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/backends/interfaces.pyi
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
from typing import Any, Optional, Union
|
3 |
+
|
4 |
+
from cryptography.hazmat.primitives.asymmetric.dh import (
|
5 |
+
DHParameterNumbers,
|
6 |
+
DHParameters,
|
7 |
+
DHPrivateKey,
|
8 |
+
DHPrivateNumbers,
|
9 |
+
DHPublicKey,
|
10 |
+
DHPublicNumbers,
|
11 |
+
)
|
12 |
+
from cryptography.hazmat.primitives.asymmetric.dsa import (
|
13 |
+
DSAParameterNumbers,
|
14 |
+
DSAParameters,
|
15 |
+
DSAPrivateKey,
|
16 |
+
DSAPrivateNumbers,
|
17 |
+
DSAPublicKey,
|
18 |
+
DSAPublicNumbers,
|
19 |
+
)
|
20 |
+
from cryptography.hazmat.primitives.asymmetric.ec import (
|
21 |
+
EllipticCurve,
|
22 |
+
EllipticCurvePrivateKey,
|
23 |
+
EllipticCurvePrivateNumbers,
|
24 |
+
EllipticCurvePublicKey,
|
25 |
+
EllipticCurvePublicNumbers,
|
26 |
+
EllipticCurveSignatureAlgorithm,
|
27 |
+
)
|
28 |
+
from cryptography.hazmat.primitives.asymmetric.padding import AsymmetricPadding
|
29 |
+
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPrivateNumbers, RSAPublicKey, RSAPublicNumbers
|
30 |
+
from cryptography.hazmat.primitives.ciphers import BlockCipherAlgorithm, CipherAlgorithm, CipherContext
|
31 |
+
from cryptography.hazmat.primitives.ciphers.modes import Mode
|
32 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm, HashContext
|
33 |
+
from cryptography.x509 import (
|
34 |
+
Certificate,
|
35 |
+
CertificateBuilder,
|
36 |
+
CertificateRevocationList,
|
37 |
+
CertificateRevocationListBuilder,
|
38 |
+
CertificateSigningRequest,
|
39 |
+
CertificateSigningRequestBuilder,
|
40 |
+
Name,
|
41 |
+
RevokedCertificate,
|
42 |
+
RevokedCertificateBuilder,
|
43 |
+
)
|
44 |
+
|
45 |
+
class CipherBackend(metaclass=ABCMeta):
|
46 |
+
@abstractmethod
|
47 |
+
def cipher_supported(self, cipher: CipherAlgorithm, mode: Mode) -> bool: ...
|
48 |
+
@abstractmethod
|
49 |
+
def create_symmetric_encryption_ctx(self, cipher: CipherAlgorithm, mode: Mode) -> CipherContext: ...
|
50 |
+
@abstractmethod
|
51 |
+
def create_symmetric_decryption_ctx(self, cipher: CipherAlgorithm, mode: Mode) -> CipherContext: ...
|
52 |
+
|
53 |
+
class CMACBackend(metaclass=ABCMeta):
|
54 |
+
@abstractmethod
|
55 |
+
def cmac_algorithm_supported(self, algorithm: BlockCipherAlgorithm) -> bool: ...
|
56 |
+
@abstractmethod
|
57 |
+
def create_cmac_ctx(self, algorithm: BlockCipherAlgorithm) -> Any: ...
|
58 |
+
|
59 |
+
class DERSerializationBackend(metaclass=ABCMeta):
|
60 |
+
@abstractmethod
|
61 |
+
def load_der_parameters(self, data: bytes) -> Any: ...
|
62 |
+
@abstractmethod
|
63 |
+
def load_der_private_key(self, data: bytes, password: Optional[bytes]) -> Any: ...
|
64 |
+
@abstractmethod
|
65 |
+
def load_der_public_key(self, data: bytes) -> Any: ...
|
66 |
+
|
67 |
+
class DHBackend(metaclass=ABCMeta):
|
68 |
+
@abstractmethod
|
69 |
+
def dh_parameters_supported(self, p: int, g: int, q: Optional[int]) -> bool: ...
|
70 |
+
@abstractmethod
|
71 |
+
def dh_x942_serialization_supported(self) -> bool: ...
|
72 |
+
@abstractmethod
|
73 |
+
def generate_dh_parameters(self, generator: int, key_size: int) -> DHParameters: ...
|
74 |
+
@abstractmethod
|
75 |
+
def generate_dh_private_key(self, parameters: DHParameters) -> DHPrivateKey: ...
|
76 |
+
@abstractmethod
|
77 |
+
def generate_dh_private_key_and_parameters(self, generator: int, key_size: int) -> DHPrivateKey: ...
|
78 |
+
@abstractmethod
|
79 |
+
def load_dh_parameter_numbers(self, numbers: DHParameterNumbers) -> DHParameters: ...
|
80 |
+
@abstractmethod
|
81 |
+
def load_dh_private_numbers(self, numbers: DHPrivateNumbers) -> DHPrivateKey: ...
|
82 |
+
@abstractmethod
|
83 |
+
def load_dh_public_numbers(self, numbers: DHPublicNumbers) -> DHPublicKey: ...
|
84 |
+
|
85 |
+
class DSABackend(metaclass=ABCMeta):
|
86 |
+
@abstractmethod
|
87 |
+
def dsa_hash_supported(self, algorithm: HashAlgorithm) -> bool: ...
|
88 |
+
@abstractmethod
|
89 |
+
def dsa_parameters_supported(self, p: int, q: int, g: int) -> bool: ...
|
90 |
+
@abstractmethod
|
91 |
+
def generate_dsa_parameters(self, key_size: int) -> DSAParameters: ...
|
92 |
+
@abstractmethod
|
93 |
+
def generate_dsa_private_key(self, parameters: DSAParameters) -> DSAPrivateKey: ...
|
94 |
+
@abstractmethod
|
95 |
+
def generate_dsa_private_key_and_parameters(self, key_size: int) -> DSAPrivateKey: ...
|
96 |
+
@abstractmethod
|
97 |
+
def load_dsa_parameter_numbers(self, numbers: DSAParameterNumbers) -> DSAParameters: ...
|
98 |
+
@abstractmethod
|
99 |
+
def load_dsa_private_numbers(self, numbers: DSAPrivateNumbers) -> DSAPrivateKey: ...
|
100 |
+
@abstractmethod
|
101 |
+
def load_dsa_public_numbers(self, numbers: DSAPublicNumbers) -> DSAPublicKey: ...
|
102 |
+
|
103 |
+
class EllipticCurveBackend(metaclass=ABCMeta):
|
104 |
+
@abstractmethod
|
105 |
+
def derive_elliptic_curve_private_key(self, private_value: int, curve: EllipticCurve) -> EllipticCurvePrivateKey: ...
|
106 |
+
@abstractmethod
|
107 |
+
def elliptic_curve_signature_algorithm_supported(
|
108 |
+
self, signature_algorithm: EllipticCurveSignatureAlgorithm, curve: EllipticCurve
|
109 |
+
) -> bool: ...
|
110 |
+
@abstractmethod
|
111 |
+
def elliptic_curve_supported(self, curve: EllipticCurve) -> bool: ...
|
112 |
+
@abstractmethod
|
113 |
+
def generate_elliptic_curve_private_key(self, curve: EllipticCurve) -> EllipticCurvePrivateKey: ...
|
114 |
+
@abstractmethod
|
115 |
+
def load_elliptic_curve_private_numbers(self, numbers: EllipticCurvePrivateNumbers) -> EllipticCurvePrivateKey: ...
|
116 |
+
@abstractmethod
|
117 |
+
def load_elliptic_curve_public_numbers(self, numbers: EllipticCurvePublicNumbers) -> EllipticCurvePublicKey: ...
|
118 |
+
|
119 |
+
class HMACBackend(metaclass=ABCMeta):
|
120 |
+
@abstractmethod
|
121 |
+
def create_hmac_ctx(self, key: bytes, algorithm: HashAlgorithm) -> HashContext: ...
|
122 |
+
@abstractmethod
|
123 |
+
def cmac_algorithm_supported(self, algorithm: HashAlgorithm) -> bool: ...
|
124 |
+
|
125 |
+
class HashBackend(metaclass=ABCMeta):
|
126 |
+
@abstractmethod
|
127 |
+
def create_hash_ctx(self, algorithm: HashAlgorithm) -> HashContext: ...
|
128 |
+
@abstractmethod
|
129 |
+
def hash_supported(self, algorithm: HashAlgorithm) -> bool: ...
|
130 |
+
|
131 |
+
class PBKDF2HMACBackend(metaclass=ABCMeta):
|
132 |
+
@abstractmethod
|
133 |
+
def derive_pbkdf2_hmac(
|
134 |
+
self, algorithm: HashAlgorithm, length: int, salt: bytes, iterations: int, key_material: bytes
|
135 |
+
) -> bytes: ...
|
136 |
+
@abstractmethod
|
137 |
+
def pbkdf2_hmac_supported(self, algorithm: HashAlgorithm) -> bool: ...
|
138 |
+
|
139 |
+
class PEMSerializationBackend(metaclass=ABCMeta):
|
140 |
+
@abstractmethod
|
141 |
+
def load_pem_parameters(self, data: bytes) -> Any: ...
|
142 |
+
@abstractmethod
|
143 |
+
def load_pem_private_key(self, data: bytes, password: Optional[bytes]) -> Any: ...
|
144 |
+
@abstractmethod
|
145 |
+
def load_pem_public_key(self, data: bytes) -> Any: ...
|
146 |
+
|
147 |
+
class RSABackend(metaclass=ABCMeta):
|
148 |
+
@abstractmethod
|
149 |
+
def generate_rsa_parameters_supported(self, public_exponent: int, key_size: int) -> bool: ...
|
150 |
+
@abstractmethod
|
151 |
+
def generate_rsa_private_key(self, public_exponent: int, key_size: int) -> RSAPrivateKey: ...
|
152 |
+
@abstractmethod
|
153 |
+
def load_rsa_public_numbers(self, numbers: RSAPublicNumbers) -> RSAPublicKey: ...
|
154 |
+
@abstractmethod
|
155 |
+
def load_rsa_private_numbers(self, numbers: RSAPrivateNumbers) -> RSAPrivateKey: ...
|
156 |
+
@abstractmethod
|
157 |
+
def rsa_padding_supported(self, padding: AsymmetricPadding) -> bool: ...
|
158 |
+
|
159 |
+
class ScryptBackend(metaclass=ABCMeta):
|
160 |
+
@abstractmethod
|
161 |
+
def derive_scrypt(self, key_material: bytes, salt: bytes, length: int, n: int, r: int, p: int) -> bytes: ...
|
162 |
+
|
163 |
+
class X509Backend(metaclass=ABCMeta):
|
164 |
+
@abstractmethod
|
165 |
+
def create_x509_certificate(
|
166 |
+
self,
|
167 |
+
builder: CertificateBuilder,
|
168 |
+
private_key: Union[DSAPrivateKey, EllipticCurvePrivateKey, RSAPrivateKey],
|
169 |
+
algorithm: HashAlgorithm,
|
170 |
+
) -> Certificate: ...
|
171 |
+
@abstractmethod
|
172 |
+
def create_x509_crl(
|
173 |
+
self,
|
174 |
+
builder: CertificateRevocationListBuilder,
|
175 |
+
private_key: Union[DSAPrivateKey, EllipticCurvePrivateKey, RSAPrivateKey],
|
176 |
+
algorithm: HashAlgorithm,
|
177 |
+
) -> CertificateRevocationList: ...
|
178 |
+
@abstractmethod
|
179 |
+
def create_x509_csr(
|
180 |
+
self,
|
181 |
+
builder: CertificateSigningRequestBuilder,
|
182 |
+
private_key: Union[DSAPrivateKey, EllipticCurvePrivateKey, RSAPrivateKey],
|
183 |
+
algorithm: HashAlgorithm,
|
184 |
+
) -> CertificateSigningRequest: ...
|
185 |
+
@abstractmethod
|
186 |
+
def create_x509_revoked_certificate(self, builder: RevokedCertificateBuilder) -> RevokedCertificate: ...
|
187 |
+
@abstractmethod
|
188 |
+
def load_der_x509_certificate(self, data: bytes) -> Certificate: ...
|
189 |
+
@abstractmethod
|
190 |
+
def load_der_x509_csr(self, data: bytes) -> CertificateSigningRequest: ...
|
191 |
+
@abstractmethod
|
192 |
+
def load_pem_x509_certificate(self, data: bytes) -> Certificate: ...
|
193 |
+
@abstractmethod
|
194 |
+
def load_pem_x509_csr(self, data: bytes) -> CertificateSigningRequest: ...
|
195 |
+
@abstractmethod
|
196 |
+
def x509_name_bytes(self, name: Name) -> bytes: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/__init__.pyi
ADDED
File without changes
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/__init__.pyi
ADDED
File without changes
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/bindings/openssl/binding.pyi
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any, Optional
|
2 |
+
|
3 |
+
class Binding(object):
|
4 |
+
ffi: Optional[Any]
|
5 |
+
lib: Optional[Any]
|
6 |
+
def init_static_locks(self) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/__init__.pyi
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any
|
2 |
+
|
3 |
+
def __getattr__(name: str) -> Any: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/__init__.pyi
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any
|
2 |
+
|
3 |
+
def __getattr__(name: str) -> Any: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dh.pyi
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
from typing import Optional
|
3 |
+
|
4 |
+
from cryptography.hazmat.backends.interfaces import DHBackend
|
5 |
+
from cryptography.hazmat.primitives.serialization import (
|
6 |
+
Encoding,
|
7 |
+
KeySerializationEncryption,
|
8 |
+
ParameterFormat,
|
9 |
+
PrivateFormat,
|
10 |
+
PublicFormat,
|
11 |
+
)
|
12 |
+
|
13 |
+
class DHParameters(metaclass=ABCMeta):
|
14 |
+
@abstractmethod
|
15 |
+
def generate_private_key(self) -> DHPrivateKey: ...
|
16 |
+
@abstractmethod
|
17 |
+
def parameter_bytes(self, encoding: Encoding, format: ParameterFormat) -> bytes: ...
|
18 |
+
@abstractmethod
|
19 |
+
def parameter_numbers(self) -> DHParameterNumbers: ...
|
20 |
+
|
21 |
+
DHParametersWithSerialization = DHParameters
|
22 |
+
|
23 |
+
class DHParameterNumbers(object):
|
24 |
+
@property
|
25 |
+
def p(self) -> int: ...
|
26 |
+
@property
|
27 |
+
def g(self) -> int: ...
|
28 |
+
@property
|
29 |
+
def q(self) -> int: ...
|
30 |
+
def __init__(self, p: int, g: int, q: Optional[int]) -> None: ...
|
31 |
+
def parameters(self, backend: Optional[DHBackend] = ...) -> DHParameters: ...
|
32 |
+
|
33 |
+
class DHPrivateKey(metaclass=ABCMeta):
|
34 |
+
key_size: int
|
35 |
+
@abstractmethod
|
36 |
+
def exchange(self, peer_public_key: DHPublicKey) -> bytes: ...
|
37 |
+
@abstractmethod
|
38 |
+
def parameters(self) -> DHParameters: ...
|
39 |
+
@abstractmethod
|
40 |
+
def public_key(self) -> DHPublicKey: ...
|
41 |
+
|
42 |
+
class DHPrivateKeyWithSerialization(DHPrivateKey):
|
43 |
+
@abstractmethod
|
44 |
+
def private_bytes(
|
45 |
+
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
|
46 |
+
) -> bytes: ...
|
47 |
+
@abstractmethod
|
48 |
+
def private_numbers(self) -> DHPrivateNumbers: ...
|
49 |
+
|
50 |
+
class DHPrivateNumbers(object):
|
51 |
+
@property
|
52 |
+
def public_numbers(self) -> DHPublicNumbers: ...
|
53 |
+
@property
|
54 |
+
def x(self) -> int: ...
|
55 |
+
def __init__(self, x: int, public_numbers: DHPublicNumbers) -> None: ...
|
56 |
+
def private_key(self, backend: Optional[DHBackend] = ...) -> DHPrivateKey: ...
|
57 |
+
|
58 |
+
class DHPublicKey(metaclass=ABCMeta):
|
59 |
+
@property
|
60 |
+
@abstractmethod
|
61 |
+
def key_size(self) -> int: ...
|
62 |
+
@abstractmethod
|
63 |
+
def parameters(self) -> DHParameters: ...
|
64 |
+
@abstractmethod
|
65 |
+
def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ...
|
66 |
+
@abstractmethod
|
67 |
+
def public_numbers(self) -> DHPublicNumbers: ...
|
68 |
+
|
69 |
+
DHPublicKeyWithSerialization = DHPublicKey
|
70 |
+
|
71 |
+
class DHPublicNumbers(object):
|
72 |
+
@property
|
73 |
+
def parameter_numbers(self) -> DHParameterNumbers: ...
|
74 |
+
@property
|
75 |
+
def y(self) -> int: ...
|
76 |
+
def __init__(self, y: int, parameter_numbers: DHParameterNumbers) -> None: ...
|
77 |
+
def public_key(self, backend: Optional[DHBackend] = ...) -> DHPublicKey: ...
|
78 |
+
|
79 |
+
def generate_parameters(generator: int, key_size: int, backend: Optional[DHBackend] = ...) -> DHParameters: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/dsa.pyi
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
from typing import Optional, Union
|
3 |
+
|
4 |
+
from cryptography.hazmat.backends.interfaces import DSABackend
|
5 |
+
from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext
|
6 |
+
from cryptography.hazmat.primitives.asymmetric.utils import Prehashed
|
7 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
8 |
+
from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat
|
9 |
+
|
10 |
+
class DSAParameters(metaclass=ABCMeta):
|
11 |
+
@abstractmethod
|
12 |
+
def generate_private_key(self) -> DSAPrivateKey: ...
|
13 |
+
|
14 |
+
class DSAParametersWithNumbers(DSAParameters):
|
15 |
+
@abstractmethod
|
16 |
+
def parameter_numbers(self) -> DSAParameterNumbers: ...
|
17 |
+
|
18 |
+
class DSAParameterNumbers(object):
|
19 |
+
@property
|
20 |
+
def p(self) -> int: ...
|
21 |
+
@property
|
22 |
+
def q(self) -> int: ...
|
23 |
+
@property
|
24 |
+
def g(self) -> int: ...
|
25 |
+
def __init__(self, p: int, q: int, g: int) -> None: ...
|
26 |
+
def parameters(self, backend: Optional[DSABackend] = ...) -> DSAParameters: ...
|
27 |
+
|
28 |
+
class DSAPrivateKey(metaclass=ABCMeta):
|
29 |
+
@property
|
30 |
+
@abstractmethod
|
31 |
+
def key_size(self) -> int: ...
|
32 |
+
@abstractmethod
|
33 |
+
def parameters(self) -> DSAParameters: ...
|
34 |
+
@abstractmethod
|
35 |
+
def public_key(self) -> DSAPublicKey: ...
|
36 |
+
@abstractmethod
|
37 |
+
def sign(self, data: bytes, algorithm: Union[HashAlgorithm, Prehashed]) -> bytes: ...
|
38 |
+
|
39 |
+
class DSAPrivateKeyWithSerialization(DSAPrivateKey):
|
40 |
+
@abstractmethod
|
41 |
+
def private_bytes(
|
42 |
+
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
|
43 |
+
) -> bytes: ...
|
44 |
+
@abstractmethod
|
45 |
+
def private_numbers(self) -> DSAPrivateNumbers: ...
|
46 |
+
|
47 |
+
class DSAPrivateNumbers(object):
|
48 |
+
@property
|
49 |
+
def x(self) -> int: ...
|
50 |
+
@property
|
51 |
+
def public_numbers(self) -> DSAPublicNumbers: ...
|
52 |
+
def __init__(self, x: int, public_numbers: DSAPublicNumbers) -> None: ...
|
53 |
+
|
54 |
+
class DSAPublicKey(metaclass=ABCMeta):
|
55 |
+
@property
|
56 |
+
@abstractmethod
|
57 |
+
def key_size(self) -> int: ...
|
58 |
+
@abstractmethod
|
59 |
+
def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ...
|
60 |
+
@abstractmethod
|
61 |
+
def public_numbers(self) -> DSAPublicNumbers: ...
|
62 |
+
@abstractmethod
|
63 |
+
def verifier(
|
64 |
+
self, signature: bytes, signature_algorithm: Union[HashAlgorithm, Prehashed]
|
65 |
+
) -> AsymmetricVerificationContext: ...
|
66 |
+
@abstractmethod
|
67 |
+
def verify(self, signature: bytes, data: bytes, algorithm: Union[HashAlgorithm, Prehashed]) -> None: ...
|
68 |
+
|
69 |
+
DSAPublicKeyWithSerialization = DSAPublicKey
|
70 |
+
|
71 |
+
class DSAPublicNumbers(object):
|
72 |
+
@property
|
73 |
+
def y(self) -> int: ...
|
74 |
+
@property
|
75 |
+
def parameter_numbers(self) -> DSAParameterNumbers: ...
|
76 |
+
def __init__(self, y: int, parameter_numbers: DSAParameterNumbers) -> None: ...
|
77 |
+
|
78 |
+
def generate_parameters(key_size: int, backend: Optional[DSABackend] = ...) -> DSAParameters: ...
|
79 |
+
def generate_private_key(key_size: int, backend: Optional[DSABackend] = ...) -> DSAPrivateKey: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ec.pyi
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
from typing import ClassVar, Optional, Union
|
3 |
+
|
4 |
+
from cryptography.hazmat.backends.interfaces import EllipticCurveBackend
|
5 |
+
from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext
|
6 |
+
from cryptography.hazmat.primitives.asymmetric.utils import Prehashed
|
7 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
8 |
+
from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat
|
9 |
+
from cryptography.x509 import ObjectIdentifier
|
10 |
+
|
11 |
+
class EllipticCurve(metaclass=ABCMeta):
|
12 |
+
@property
|
13 |
+
@abstractmethod
|
14 |
+
def key_size(self) -> int: ...
|
15 |
+
@property
|
16 |
+
@abstractmethod
|
17 |
+
def name(self) -> str: ...
|
18 |
+
|
19 |
+
class BrainpoolP256R1(EllipticCurve):
|
20 |
+
key_size: int = ...
|
21 |
+
name: str = ...
|
22 |
+
|
23 |
+
class BrainpoolP384R1(EllipticCurve):
|
24 |
+
key_size: int = ...
|
25 |
+
name: str = ...
|
26 |
+
|
27 |
+
class BrainpoolP512R1(EllipticCurve):
|
28 |
+
key_size: int = ...
|
29 |
+
name: str = ...
|
30 |
+
|
31 |
+
class SECP192R1(EllipticCurve):
|
32 |
+
key_size: int = ...
|
33 |
+
name: str = ...
|
34 |
+
|
35 |
+
class SECP224R1(EllipticCurve):
|
36 |
+
key_size: int = ...
|
37 |
+
name: str = ...
|
38 |
+
|
39 |
+
class SECP256K1(EllipticCurve):
|
40 |
+
key_size: int = ...
|
41 |
+
name: str = ...
|
42 |
+
|
43 |
+
class SECP256R1(EllipticCurve):
|
44 |
+
key_size: int = ...
|
45 |
+
name: str = ...
|
46 |
+
|
47 |
+
class SECP384R1(EllipticCurve):
|
48 |
+
key_size: int = ...
|
49 |
+
name: str = ...
|
50 |
+
|
51 |
+
class SECP521R1(EllipticCurve):
|
52 |
+
key_size: int = ...
|
53 |
+
name: str = ...
|
54 |
+
|
55 |
+
class SECT163K1(EllipticCurve):
|
56 |
+
key_size: int = ...
|
57 |
+
name: str = ...
|
58 |
+
|
59 |
+
class SECT163R2(EllipticCurve):
|
60 |
+
key_size: int = ...
|
61 |
+
name: str = ...
|
62 |
+
|
63 |
+
class SECT233K1(EllipticCurve):
|
64 |
+
key_size: int = ...
|
65 |
+
name: str = ...
|
66 |
+
|
67 |
+
class SECT233R1(EllipticCurve):
|
68 |
+
key_size: int = ...
|
69 |
+
name: str = ...
|
70 |
+
|
71 |
+
class SECT283K1(EllipticCurve):
|
72 |
+
key_size: int = ...
|
73 |
+
name: str = ...
|
74 |
+
|
75 |
+
class SECT283R1(EllipticCurve):
|
76 |
+
key_size: int = ...
|
77 |
+
name: str = ...
|
78 |
+
|
79 |
+
class SECT409K1(EllipticCurve):
|
80 |
+
key_size: int = ...
|
81 |
+
name: str = ...
|
82 |
+
|
83 |
+
class SECT409R1(EllipticCurve):
|
84 |
+
key_size: int = ...
|
85 |
+
name: str = ...
|
86 |
+
|
87 |
+
class SECT571K1(EllipticCurve):
|
88 |
+
key_size: int = ...
|
89 |
+
name: str = ...
|
90 |
+
|
91 |
+
class SECT571R1(EllipticCurve):
|
92 |
+
key_size: int = ...
|
93 |
+
name: str = ...
|
94 |
+
|
95 |
+
class EllipticCurveOID(object):
|
96 |
+
SECP192R1: ClassVar[ObjectIdentifier]
|
97 |
+
SECP224R1: ClassVar[ObjectIdentifier]
|
98 |
+
SECP256K1: ClassVar[ObjectIdentifier]
|
99 |
+
SECP256R1: ClassVar[ObjectIdentifier]
|
100 |
+
SECP384R1: ClassVar[ObjectIdentifier]
|
101 |
+
SECP521R1: ClassVar[ObjectIdentifier]
|
102 |
+
BRAINPOOLP256R1: ClassVar[ObjectIdentifier]
|
103 |
+
BRAINPOOLP384R1: ClassVar[ObjectIdentifier]
|
104 |
+
BRAINPOOLP512R1: ClassVar[ObjectIdentifier]
|
105 |
+
SECT163K1: ClassVar[ObjectIdentifier]
|
106 |
+
SECT163R2: ClassVar[ObjectIdentifier]
|
107 |
+
SECT233K1: ClassVar[ObjectIdentifier]
|
108 |
+
SECT233R1: ClassVar[ObjectIdentifier]
|
109 |
+
SECT283K1: ClassVar[ObjectIdentifier]
|
110 |
+
SECT283R1: ClassVar[ObjectIdentifier]
|
111 |
+
SECT409K1: ClassVar[ObjectIdentifier]
|
112 |
+
SECT409R1: ClassVar[ObjectIdentifier]
|
113 |
+
SECT571K1: ClassVar[ObjectIdentifier]
|
114 |
+
SECT571R1: ClassVar[ObjectIdentifier]
|
115 |
+
|
116 |
+
class EllipticCurvePrivateKey(metaclass=ABCMeta):
|
117 |
+
@property
|
118 |
+
@abstractmethod
|
119 |
+
def curve(self) -> EllipticCurve: ...
|
120 |
+
@property
|
121 |
+
@abstractmethod
|
122 |
+
def key_size(self) -> int: ...
|
123 |
+
@abstractmethod
|
124 |
+
def exchange(self, algorithm: ECDH, peer_public_key: EllipticCurvePublicKey) -> bytes: ...
|
125 |
+
@abstractmethod
|
126 |
+
def public_key(self) -> EllipticCurvePublicKey: ...
|
127 |
+
@abstractmethod
|
128 |
+
def sign(self, data: bytes, signature_algorithm: EllipticCurveSignatureAlgorithm) -> bytes: ...
|
129 |
+
|
130 |
+
class EllipticCurvePrivateKeyWithSerialization(EllipticCurvePrivateKey):
|
131 |
+
@abstractmethod
|
132 |
+
def private_bytes(
|
133 |
+
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
|
134 |
+
) -> bytes: ...
|
135 |
+
@abstractmethod
|
136 |
+
def private_numbers(self) -> EllipticCurvePrivateNumbers: ...
|
137 |
+
|
138 |
+
class EllipticCurvePrivateNumbers(object):
|
139 |
+
@property
|
140 |
+
def private_value(self) -> int: ...
|
141 |
+
@property
|
142 |
+
def public_numbers(self) -> EllipticCurvePublicNumbers: ...
|
143 |
+
def __init__(self, private_value: int, public_numbers: EllipticCurvePublicNumbers) -> None: ...
|
144 |
+
def private_key(self, backend: Optional[EllipticCurveBackend] = ...) -> EllipticCurvePrivateKey: ...
|
145 |
+
|
146 |
+
class EllipticCurvePublicKey(metaclass=ABCMeta):
|
147 |
+
@property
|
148 |
+
@abstractmethod
|
149 |
+
def curve(self) -> EllipticCurve: ...
|
150 |
+
@property
|
151 |
+
@abstractmethod
|
152 |
+
def key_size(self) -> int: ...
|
153 |
+
@classmethod
|
154 |
+
def from_encoded_point(cls, curve: EllipticCurve, data: bytes) -> EllipticCurvePublicKey: ...
|
155 |
+
@abstractmethod
|
156 |
+
def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ...
|
157 |
+
@abstractmethod
|
158 |
+
def public_numbers(self) -> EllipticCurvePublicNumbers: ...
|
159 |
+
@abstractmethod
|
160 |
+
def verifier(
|
161 |
+
self, signature: bytes, signature_algorithm: EllipticCurveSignatureAlgorithm
|
162 |
+
) -> AsymmetricVerificationContext: ...
|
163 |
+
@abstractmethod
|
164 |
+
def verify(self, signature: bytes, data: bytes, signature_algorithm: EllipticCurveSignatureAlgorithm) -> None: ...
|
165 |
+
|
166 |
+
EllipticCurvePublicKeyWithSerialization = EllipticCurvePublicKey
|
167 |
+
|
168 |
+
class EllipticCurvePublicNumbers(object):
|
169 |
+
@property
|
170 |
+
def curve(self) -> EllipticCurve: ...
|
171 |
+
@property
|
172 |
+
def x(self) -> int: ...
|
173 |
+
@property
|
174 |
+
def y(self) -> int: ...
|
175 |
+
def __init__(self, x: int, y: int, curve: EllipticCurve) -> None: ...
|
176 |
+
@classmethod
|
177 |
+
def from_encoded_point(cls, curve: EllipticCurve, data: bytes) -> EllipticCurvePublicNumbers: ...
|
178 |
+
def public_key(self, backend: Optional[EllipticCurveBackend] = ...) -> EllipticCurvePublicKey: ...
|
179 |
+
|
180 |
+
class EllipticCurveSignatureAlgorithm(metaclass=ABCMeta):
|
181 |
+
@property
|
182 |
+
@abstractmethod
|
183 |
+
def algorithm(self) -> Union[HashAlgorithm, Prehashed]: ...
|
184 |
+
|
185 |
+
class ECDH(object): ...
|
186 |
+
|
187 |
+
class ECDSA(EllipticCurveSignatureAlgorithm):
|
188 |
+
def __init__(self, algorithm: Union[HashAlgorithm, Prehashed]): ...
|
189 |
+
@property
|
190 |
+
def algorithm(self) -> Union[HashAlgorithm, Prehashed]: ...
|
191 |
+
|
192 |
+
def derive_private_key(
|
193 |
+
private_value: int, curve: EllipticCurve, backend: Optional[EllipticCurveBackend] = ...
|
194 |
+
) -> EllipticCurvePrivateKey: ...
|
195 |
+
def generate_private_key(curve: EllipticCurve, backend: Optional[EllipticCurveBackend] = ...) -> EllipticCurvePrivateKey: ...
|
196 |
+
def get_curve_for_oid(oid: ObjectIdentifier) -> EllipticCurve: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed25519.pyi
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
|
3 |
+
from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat
|
4 |
+
|
5 |
+
class Ed25519PrivateKey(metaclass=ABCMeta):
|
6 |
+
@classmethod
|
7 |
+
def generate(cls) -> Ed25519PrivateKey: ...
|
8 |
+
@classmethod
|
9 |
+
def from_private_bytes(cls, data: bytes) -> Ed25519PrivateKey: ...
|
10 |
+
@abstractmethod
|
11 |
+
def private_bytes(
|
12 |
+
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
|
13 |
+
) -> bytes: ...
|
14 |
+
@abstractmethod
|
15 |
+
def public_key(self) -> Ed25519PublicKey: ...
|
16 |
+
@abstractmethod
|
17 |
+
def sign(self, data: bytes) -> bytes: ...
|
18 |
+
|
19 |
+
class Ed25519PublicKey(metaclass=ABCMeta):
|
20 |
+
@classmethod
|
21 |
+
def from_public_bytes(cls, data: bytes) -> Ed25519PublicKey: ...
|
22 |
+
@abstractmethod
|
23 |
+
def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ...
|
24 |
+
@abstractmethod
|
25 |
+
def verify(self, signature: bytes, data: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/ed448.pyi
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
|
3 |
+
from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat
|
4 |
+
|
5 |
+
class Ed448PrivateKey(metaclass=ABCMeta):
|
6 |
+
@classmethod
|
7 |
+
def generate(cls) -> Ed448PrivateKey: ...
|
8 |
+
@classmethod
|
9 |
+
def from_private_bytes(cls, data: bytes) -> Ed448PrivateKey: ...
|
10 |
+
@abstractmethod
|
11 |
+
def private_bytes(
|
12 |
+
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
|
13 |
+
) -> bytes: ...
|
14 |
+
@abstractmethod
|
15 |
+
def public_key(self) -> Ed448PublicKey: ...
|
16 |
+
@abstractmethod
|
17 |
+
def sign(self, data: bytes) -> bytes: ...
|
18 |
+
|
19 |
+
class Ed448PublicKey(metaclass=ABCMeta):
|
20 |
+
@classmethod
|
21 |
+
def from_public_bytes(cls, data: bytes) -> Ed448PublicKey: ...
|
22 |
+
@abstractmethod
|
23 |
+
def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ...
|
24 |
+
@abstractmethod
|
25 |
+
def verify(self, signature: bytes, data: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/padding.pyi
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
from typing import ClassVar, Optional, Union
|
3 |
+
|
4 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
5 |
+
|
6 |
+
class AsymmetricPadding(metaclass=ABCMeta):
|
7 |
+
@property
|
8 |
+
@abstractmethod
|
9 |
+
def name(self) -> str: ...
|
10 |
+
|
11 |
+
class MGF1(object):
|
12 |
+
def __init__(self, algorithm: HashAlgorithm) -> None: ...
|
13 |
+
|
14 |
+
class OAEP(AsymmetricPadding):
|
15 |
+
def __init__(self, mgf: MGF1, algorithm: HashAlgorithm, label: Optional[bytes]) -> None: ...
|
16 |
+
@property
|
17 |
+
def name(self) -> str: ...
|
18 |
+
|
19 |
+
class PKCS1v15(AsymmetricPadding):
|
20 |
+
@property
|
21 |
+
def name(self) -> str: ...
|
22 |
+
|
23 |
+
class PSS(AsymmetricPadding):
|
24 |
+
MAX_LENGTH: ClassVar[object]
|
25 |
+
def __init__(self, mgf: MGF1, salt_length: Union[int, object]) -> None: ...
|
26 |
+
@property
|
27 |
+
def name(self) -> str: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/rsa.pyi
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
from typing import Optional, Tuple, Union
|
3 |
+
|
4 |
+
from cryptography.hazmat.backends.interfaces import RSABackend
|
5 |
+
from cryptography.hazmat.primitives.asymmetric import AsymmetricVerificationContext
|
6 |
+
from cryptography.hazmat.primitives.asymmetric.padding import AsymmetricPadding
|
7 |
+
from cryptography.hazmat.primitives.asymmetric.utils import Prehashed
|
8 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
9 |
+
from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat
|
10 |
+
|
11 |
+
class RSAPrivateKey(metaclass=ABCMeta):
|
12 |
+
@property
|
13 |
+
@abstractmethod
|
14 |
+
def key_size(self) -> int: ...
|
15 |
+
@abstractmethod
|
16 |
+
def decrypt(self, ciphertext: bytes, padding: AsymmetricPadding) -> bytes: ...
|
17 |
+
@abstractmethod
|
18 |
+
def public_key(self) -> RSAPublicKey: ...
|
19 |
+
@abstractmethod
|
20 |
+
def sign(self, data: bytes, padding: AsymmetricPadding, algorithm: Union[HashAlgorithm, Prehashed]) -> bytes: ...
|
21 |
+
|
22 |
+
class RSAPrivateKeyWithSerialization(RSAPrivateKey):
|
23 |
+
@abstractmethod
|
24 |
+
def private_bytes(
|
25 |
+
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
|
26 |
+
) -> bytes: ...
|
27 |
+
@abstractmethod
|
28 |
+
def private_numbers(self) -> RSAPrivateNumbers: ...
|
29 |
+
|
30 |
+
class RSAPublicKey(metaclass=ABCMeta):
|
31 |
+
@property
|
32 |
+
@abstractmethod
|
33 |
+
def key_size(self) -> int: ...
|
34 |
+
@abstractmethod
|
35 |
+
def encrypt(self, plaintext: bytes, padding: AsymmetricPadding) -> bytes: ...
|
36 |
+
@abstractmethod
|
37 |
+
def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ...
|
38 |
+
@abstractmethod
|
39 |
+
def public_numbers(self) -> RSAPublicNumbers: ...
|
40 |
+
@abstractmethod
|
41 |
+
def verifier(
|
42 |
+
self, signature: bytes, padding: AsymmetricPadding, algorithm: Union[HashAlgorithm, Prehashed]
|
43 |
+
) -> AsymmetricVerificationContext: ...
|
44 |
+
@abstractmethod
|
45 |
+
def verify(
|
46 |
+
self, signature: bytes, data: bytes, padding: AsymmetricPadding, algorithm: Union[HashAlgorithm, Prehashed]
|
47 |
+
) -> None: ...
|
48 |
+
|
49 |
+
RSAPublicKeyWithSerialization = RSAPublicKey
|
50 |
+
|
51 |
+
def generate_private_key(
|
52 |
+
public_exponent: int, key_size: int, backend: Optional[RSABackend] = ...
|
53 |
+
) -> RSAPrivateKeyWithSerialization: ...
|
54 |
+
def rsa_crt_iqmp(p: int, q: int) -> int: ...
|
55 |
+
def rsa_crt_dmp1(private_exponent: int, p: int) -> int: ...
|
56 |
+
def rsa_crt_dmq1(private_exponent: int, q: int) -> int: ...
|
57 |
+
def rsa_recover_prime_factors(n: int, e: int, d: int) -> Tuple[int, int]: ...
|
58 |
+
|
59 |
+
class RSAPrivateNumbers(object):
|
60 |
+
def __init__(self, p: int, q: int, d: int, dmp1: int, dmq1: int, iqmp: int, public_numbers: RSAPublicNumbers) -> None: ...
|
61 |
+
@property
|
62 |
+
def p(self) -> int: ...
|
63 |
+
@property
|
64 |
+
def q(self) -> int: ...
|
65 |
+
@property
|
66 |
+
def d(self) -> int: ...
|
67 |
+
@property
|
68 |
+
def dmp1(self) -> int: ...
|
69 |
+
@property
|
70 |
+
def dmq1(self) -> int: ...
|
71 |
+
@property
|
72 |
+
def iqmp(self) -> int: ...
|
73 |
+
@property
|
74 |
+
def public_numbers(self) -> RSAPublicNumbers: ...
|
75 |
+
def private_key(self, backend: Optional[RSABackend] = ...) -> RSAPrivateKey: ...
|
76 |
+
|
77 |
+
class RSAPublicNumbers(object):
|
78 |
+
def __init__(self, e: int, n: int) -> None: ...
|
79 |
+
@property
|
80 |
+
def e(self) -> int: ...
|
81 |
+
@property
|
82 |
+
def n(self) -> int: ...
|
83 |
+
def public_key(self, backend: Optional[RSABackend] = ...) -> RSAPublicKey: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/utils.pyi
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Tuple
|
2 |
+
|
3 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
4 |
+
|
5 |
+
def decode_dss_signature(signature: bytes) -> Tuple[int, int]: ...
|
6 |
+
def encode_dss_signature(r: int, s: int) -> bytes: ...
|
7 |
+
|
8 |
+
class Prehashed(object):
|
9 |
+
_algorithm: HashAlgorithm # undocumented
|
10 |
+
_digest_size: int # undocumented
|
11 |
+
def __init__(self, algorithm: HashAlgorithm) -> None: ...
|
12 |
+
digest_size: int
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x25519.pyi
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
|
3 |
+
from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat
|
4 |
+
|
5 |
+
class X25519PrivateKey(metaclass=ABCMeta):
|
6 |
+
@classmethod
|
7 |
+
def from_private_bytes(cls, data: bytes) -> X25519PrivateKey: ...
|
8 |
+
@classmethod
|
9 |
+
def generate(cls) -> X25519PrivateKey: ...
|
10 |
+
@abstractmethod
|
11 |
+
def exchange(self, peer_public_key: X25519PublicKey) -> bytes: ...
|
12 |
+
@abstractmethod
|
13 |
+
def private_bytes(
|
14 |
+
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
|
15 |
+
) -> bytes: ...
|
16 |
+
@abstractmethod
|
17 |
+
def public_key(self) -> X25519PublicKey: ...
|
18 |
+
|
19 |
+
class X25519PublicKey(metaclass=ABCMeta):
|
20 |
+
@classmethod
|
21 |
+
def from_public_bytes(cls, data: bytes) -> X25519PublicKey: ...
|
22 |
+
@abstractmethod
|
23 |
+
def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/asymmetric/x448.pyi
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
|
3 |
+
from cryptography.hazmat.primitives.serialization import Encoding, KeySerializationEncryption, PrivateFormat, PublicFormat
|
4 |
+
|
5 |
+
class X448PrivateKey(metaclass=ABCMeta):
|
6 |
+
@classmethod
|
7 |
+
def from_private_bytes(cls, data: bytes) -> X448PrivateKey: ...
|
8 |
+
@classmethod
|
9 |
+
def generate(cls) -> X448PrivateKey: ...
|
10 |
+
@abstractmethod
|
11 |
+
def exchange(self, peer_public_key: X448PublicKey) -> bytes: ...
|
12 |
+
@abstractmethod
|
13 |
+
def private_bytes(
|
14 |
+
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
|
15 |
+
) -> bytes: ...
|
16 |
+
@abstractmethod
|
17 |
+
def public_key(self) -> X448PublicKey: ...
|
18 |
+
|
19 |
+
class X448PublicKey(metaclass=ABCMeta):
|
20 |
+
@classmethod
|
21 |
+
def from_public_bytes(cls, data: bytes) -> X448PublicKey: ...
|
22 |
+
@abstractmethod
|
23 |
+
def public_bytes(self, encoding: Encoding, format: PublicFormat) -> bytes: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/__init__.pyi
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
from typing import Optional
|
3 |
+
|
4 |
+
from cryptography.hazmat.backends.interfaces import CipherBackend
|
5 |
+
from cryptography.hazmat.primitives.ciphers.modes import Mode
|
6 |
+
|
7 |
+
class AEADCipherContext(metaclass=ABCMeta):
|
8 |
+
@abstractmethod
|
9 |
+
def authenticate_additional_data(self, data: bytes) -> None: ...
|
10 |
+
|
11 |
+
class AEADDecryptionContext(metaclass=ABCMeta):
|
12 |
+
@abstractmethod
|
13 |
+
def finalize_with_tag(self, tag: bytes) -> bytes: ...
|
14 |
+
|
15 |
+
class AEADEncryptionContext(metaclass=ABCMeta):
|
16 |
+
@property
|
17 |
+
@abstractmethod
|
18 |
+
def tag(self) -> bytes: ...
|
19 |
+
|
20 |
+
class BlockCipherAlgorithm(metaclass=ABCMeta):
|
21 |
+
@property
|
22 |
+
@abstractmethod
|
23 |
+
def block_size(self) -> int: ...
|
24 |
+
|
25 |
+
class Cipher(object):
|
26 |
+
def __init__(self, algorithm: CipherAlgorithm, mode: Optional[Mode], backend: Optional[CipherBackend] = ...) -> None: ...
|
27 |
+
def decryptor(self) -> CipherContext: ...
|
28 |
+
def encryptor(self) -> CipherContext: ...
|
29 |
+
|
30 |
+
class CipherAlgorithm(metaclass=ABCMeta):
|
31 |
+
@property
|
32 |
+
@abstractmethod
|
33 |
+
def key_size(self) -> int: ...
|
34 |
+
@property
|
35 |
+
@abstractmethod
|
36 |
+
def name(self) -> str: ...
|
37 |
+
|
38 |
+
class CipherContext(metaclass=ABCMeta):
|
39 |
+
@abstractmethod
|
40 |
+
def finalize(self) -> bytes: ...
|
41 |
+
@abstractmethod
|
42 |
+
def update(self, data: bytes) -> bytes: ...
|
43 |
+
@abstractmethod
|
44 |
+
def update_into(self, data: bytes, buf: bytearray) -> int: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/aead.pyi
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
class AESCCM(object):
|
4 |
+
def __init__(self, key: bytes, tag_length: Optional[int]) -> None: ...
|
5 |
+
def decrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ...
|
6 |
+
def encrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ...
|
7 |
+
@classmethod
|
8 |
+
def generate_key(cls, bit_length: int) -> bytes: ...
|
9 |
+
|
10 |
+
class AESGCM(object):
|
11 |
+
def __init__(self, key: bytes) -> None: ...
|
12 |
+
def decrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ...
|
13 |
+
def encrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ...
|
14 |
+
@classmethod
|
15 |
+
def generate_key(cls, bit_length: int) -> bytes: ...
|
16 |
+
|
17 |
+
class ChaCha20Poly1305(object):
|
18 |
+
def __init__(self, key: bytes) -> None: ...
|
19 |
+
def decrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ...
|
20 |
+
def encrypt(self, nonce: bytes, data: bytes, associated_data: Optional[bytes]) -> bytes: ...
|
21 |
+
@classmethod
|
22 |
+
def generate_key(cls) -> bytes: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/algorithms.pyi
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import FrozenSet
|
2 |
+
|
3 |
+
from cryptography.hazmat.primitives.ciphers import BlockCipherAlgorithm, CipherAlgorithm
|
4 |
+
from cryptography.hazmat.primitives.ciphers.modes import ModeWithNonce
|
5 |
+
|
6 |
+
class AES(BlockCipherAlgorithm, CipherAlgorithm):
|
7 |
+
def __init__(self, key: bytes) -> None: ...
|
8 |
+
block_size: int = ...
|
9 |
+
name: str = ...
|
10 |
+
key_sizes: FrozenSet[int] = ...
|
11 |
+
@property
|
12 |
+
def key_size(self) -> int: ...
|
13 |
+
|
14 |
+
class ARC4(CipherAlgorithm):
|
15 |
+
def __init__(self, key: bytes) -> None: ...
|
16 |
+
@property
|
17 |
+
def key_size(self) -> int: ...
|
18 |
+
name: str = ...
|
19 |
+
key_sizes: FrozenSet[int] = ...
|
20 |
+
|
21 |
+
class Blowfish(BlockCipherAlgorithm, CipherAlgorithm):
|
22 |
+
def __init__(self, key: bytes) -> None: ...
|
23 |
+
@property
|
24 |
+
def key_size(self) -> int: ...
|
25 |
+
block_size: int = ...
|
26 |
+
name: str = ...
|
27 |
+
key_sizes: FrozenSet[int] = ...
|
28 |
+
|
29 |
+
class Camellia(BlockCipherAlgorithm, CipherAlgorithm):
|
30 |
+
def __init__(self, key: bytes) -> None: ...
|
31 |
+
@property
|
32 |
+
def key_size(self) -> int: ...
|
33 |
+
block_size: int = ...
|
34 |
+
name: str = ...
|
35 |
+
key_sizes: FrozenSet[int] = ...
|
36 |
+
|
37 |
+
class CAST5(BlockCipherAlgorithm, CipherAlgorithm):
|
38 |
+
def __init__(self, key: bytes) -> None: ...
|
39 |
+
@property
|
40 |
+
def key_size(self) -> int: ...
|
41 |
+
block_size: int = ...
|
42 |
+
name: str = ...
|
43 |
+
key_sizes: FrozenSet[int] = ...
|
44 |
+
|
45 |
+
class ChaCha20(CipherAlgorithm, ModeWithNonce):
|
46 |
+
def __init__(self, key: bytes, nonce: bytes) -> None: ...
|
47 |
+
@property
|
48 |
+
def key_size(self) -> int: ...
|
49 |
+
name: str = ...
|
50 |
+
key_sizes: FrozenSet[int] = ...
|
51 |
+
@property
|
52 |
+
def nonce(self) -> bytes: ...
|
53 |
+
|
54 |
+
class IDEA(CipherAlgorithm):
|
55 |
+
def __init__(self, key: bytes) -> None: ...
|
56 |
+
@property
|
57 |
+
def key_size(self) -> int: ...
|
58 |
+
block_size: int = ...
|
59 |
+
name: str = ...
|
60 |
+
key_sizes: FrozenSet[int] = ...
|
61 |
+
|
62 |
+
class SEED(BlockCipherAlgorithm, CipherAlgorithm):
|
63 |
+
def __init__(self, key: bytes) -> None: ...
|
64 |
+
@property
|
65 |
+
def key_size(self) -> int: ...
|
66 |
+
block_size: int = ...
|
67 |
+
name: str = ...
|
68 |
+
key_sizes: FrozenSet[int] = ...
|
69 |
+
|
70 |
+
class TripleDES(BlockCipherAlgorithm, CipherAlgorithm):
|
71 |
+
def __init__(self, key: bytes) -> None: ...
|
72 |
+
@property
|
73 |
+
def key_size(self) -> int: ...
|
74 |
+
block_size: int = ...
|
75 |
+
name: str = ...
|
76 |
+
key_sizes: FrozenSet[int] = ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/ciphers/modes.pyi
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
from typing import Optional
|
3 |
+
|
4 |
+
from cryptography.hazmat.primitives.ciphers import CipherAlgorithm
|
5 |
+
|
6 |
+
class Mode(metaclass=ABCMeta):
|
7 |
+
@property
|
8 |
+
@abstractmethod
|
9 |
+
def name(self) -> str: ...
|
10 |
+
@abstractmethod
|
11 |
+
def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ...
|
12 |
+
|
13 |
+
class ModeWithAuthenticationTag(metaclass=ABCMeta):
|
14 |
+
@property
|
15 |
+
@abstractmethod
|
16 |
+
def tag(self) -> bytes: ...
|
17 |
+
|
18 |
+
class ModeWithInitializationVector(metaclass=ABCMeta):
|
19 |
+
@property
|
20 |
+
@abstractmethod
|
21 |
+
def initialization_vector(self) -> bytes: ...
|
22 |
+
|
23 |
+
class ModeWithNonce(metaclass=ABCMeta):
|
24 |
+
@property
|
25 |
+
@abstractmethod
|
26 |
+
def nonce(self) -> bytes: ...
|
27 |
+
|
28 |
+
class ModeWithTweak(metaclass=ABCMeta):
|
29 |
+
@property
|
30 |
+
@abstractmethod
|
31 |
+
def tweak(self) -> bytes: ...
|
32 |
+
|
33 |
+
class CBC(Mode, ModeWithInitializationVector):
|
34 |
+
def __init__(self, initialization_vector: bytes) -> None: ...
|
35 |
+
@property
|
36 |
+
def initialization_vector(self) -> bytes: ...
|
37 |
+
@property
|
38 |
+
def name(self) -> str: ...
|
39 |
+
def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ...
|
40 |
+
|
41 |
+
class CTR(Mode, ModeWithNonce):
|
42 |
+
def __init__(self, nonce: bytes) -> None: ...
|
43 |
+
@property
|
44 |
+
def name(self) -> str: ...
|
45 |
+
@property
|
46 |
+
def nonce(self) -> bytes: ...
|
47 |
+
def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ...
|
48 |
+
|
49 |
+
class CFB(Mode, ModeWithInitializationVector):
|
50 |
+
def __init__(self, initialization_vector: bytes) -> None: ...
|
51 |
+
@property
|
52 |
+
def initialization_vector(self) -> bytes: ...
|
53 |
+
@property
|
54 |
+
def name(self) -> str: ...
|
55 |
+
def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ...
|
56 |
+
|
57 |
+
class CFB8(Mode, ModeWithInitializationVector):
|
58 |
+
def __init__(self, initialization_vector: bytes) -> None: ...
|
59 |
+
@property
|
60 |
+
def initialization_vector(self) -> bytes: ...
|
61 |
+
@property
|
62 |
+
def name(self) -> str: ...
|
63 |
+
def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ...
|
64 |
+
|
65 |
+
class ECB(Mode):
|
66 |
+
@property
|
67 |
+
def name(self) -> str: ...
|
68 |
+
def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ...
|
69 |
+
|
70 |
+
class GCM(Mode, ModeWithInitializationVector, ModeWithAuthenticationTag):
|
71 |
+
def __init__(self, initialization_vector: bytes, tag: Optional[bytes], min_tag_length: Optional[int]) -> None: ...
|
72 |
+
@property
|
73 |
+
def initialization_vector(self) -> bytes: ...
|
74 |
+
@property
|
75 |
+
def name(self) -> str: ...
|
76 |
+
@property
|
77 |
+
def tag(self) -> bytes: ...
|
78 |
+
def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ...
|
79 |
+
|
80 |
+
class OFB(Mode, ModeWithInitializationVector):
|
81 |
+
def __init__(self, initialization_vector: bytes) -> None: ...
|
82 |
+
@property
|
83 |
+
def initialization_vector(self) -> bytes: ...
|
84 |
+
@property
|
85 |
+
def name(self) -> str: ...
|
86 |
+
def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ...
|
87 |
+
|
88 |
+
class XTS(Mode, ModeWithTweak):
|
89 |
+
def __init__(self, tweak: bytes) -> None: ...
|
90 |
+
@property
|
91 |
+
def name(self) -> str: ...
|
92 |
+
@property
|
93 |
+
def tweak(self) -> bytes: ...
|
94 |
+
def validate_for_algorithm(self, algorithm: CipherAlgorithm) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/cmac.pyi
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import CMACBackend
|
4 |
+
from cryptography.hazmat.primitives.ciphers import BlockCipherAlgorithm
|
5 |
+
|
6 |
+
class CMAC(object):
|
7 |
+
def __init__(self, algorithm: BlockCipherAlgorithm, backend: Optional[CMACBackend] = ...) -> None: ...
|
8 |
+
def copy(self) -> CMAC: ...
|
9 |
+
def finalize(self) -> bytes: ...
|
10 |
+
def update(self, data: bytes) -> None: ...
|
11 |
+
def verify(self, signature: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/constant_time.pyi
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
def bytes_eq(a: bytes, b: bytes) -> bool: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/hashes.pyi
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
from typing import Optional
|
3 |
+
|
4 |
+
from cryptography.hazmat.backends.interfaces import HashBackend
|
5 |
+
|
6 |
+
class HashAlgorithm(metaclass=ABCMeta):
|
7 |
+
digest_size: int
|
8 |
+
name: str
|
9 |
+
|
10 |
+
class HashContext(metaclass=ABCMeta):
|
11 |
+
algorithm: HashAlgorithm
|
12 |
+
@abstractmethod
|
13 |
+
def copy(self) -> HashContext: ...
|
14 |
+
@abstractmethod
|
15 |
+
def finalize(self) -> bytes: ...
|
16 |
+
@abstractmethod
|
17 |
+
def update(self, data: bytes) -> None: ...
|
18 |
+
|
19 |
+
class BLAKE2b(HashAlgorithm): ...
|
20 |
+
class BLAKE2s(HashAlgorithm): ...
|
21 |
+
class MD5(HashAlgorithm): ...
|
22 |
+
class SHA1(HashAlgorithm): ...
|
23 |
+
class SHA224(HashAlgorithm): ...
|
24 |
+
class SHA256(HashAlgorithm): ...
|
25 |
+
class SHA384(HashAlgorithm): ...
|
26 |
+
class SHA3_224(HashAlgorithm): ...
|
27 |
+
class SHA3_256(HashAlgorithm): ...
|
28 |
+
class SHA3_384(HashAlgorithm): ...
|
29 |
+
class SHA3_512(HashAlgorithm): ...
|
30 |
+
class SHA512(HashAlgorithm): ...
|
31 |
+
class SHA512_224(HashAlgorithm): ...
|
32 |
+
class SHA512_256(HashAlgorithm): ...
|
33 |
+
|
34 |
+
class SHAKE128(HashAlgorithm):
|
35 |
+
def __init__(self, digest_size: int) -> None: ...
|
36 |
+
|
37 |
+
class SHAKE256(HashAlgorithm):
|
38 |
+
def __init__(self, digest_size: int) -> None: ...
|
39 |
+
|
40 |
+
class Hash(HashContext):
|
41 |
+
def __init__(self, algorithm: HashAlgorithm, backend: Optional[HashBackend] = ...): ...
|
42 |
+
def copy(self) -> Hash: ...
|
43 |
+
def finalize(self) -> bytes: ...
|
44 |
+
def update(self, data: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/hmac.pyi
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import HMACBackend
|
4 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
5 |
+
|
6 |
+
class HMAC(object):
|
7 |
+
def __init__(self, key: bytes, algorithm: HashAlgorithm, backend: Optional[HMACBackend] = ...) -> None: ...
|
8 |
+
def copy(self) -> HMAC: ...
|
9 |
+
def finalize(self) -> bytes: ...
|
10 |
+
def update(self, msg: bytes) -> None: ...
|
11 |
+
def verify(self, signature: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/__init__.pyi
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
|
3 |
+
class KeyDerivationFunction(metaclass=ABCMeta):
|
4 |
+
@abstractmethod
|
5 |
+
def derive(self, key_material: bytes) -> bytes: ...
|
6 |
+
@abstractmethod
|
7 |
+
def verify(self, key_material: bytes, expected_key: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/concatkdf.pyi
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import HashBackend, HMACBackend
|
4 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
5 |
+
from cryptography.hazmat.primitives.kdf import KeyDerivationFunction
|
6 |
+
|
7 |
+
class ConcatKDFHash(KeyDerivationFunction):
|
8 |
+
def __init__(
|
9 |
+
self, algorithm: HashAlgorithm, length: int, otherinfo: Optional[bytes], backend: Optional[HashBackend] = ...
|
10 |
+
): ...
|
11 |
+
def derive(self, key_material: bytes) -> bytes: ...
|
12 |
+
def verify(self, key_material: bytes, expected_key: bytes) -> None: ...
|
13 |
+
|
14 |
+
class ConcatKDFHMAC(KeyDerivationFunction):
|
15 |
+
def __init__(
|
16 |
+
self,
|
17 |
+
algorithm: HashAlgorithm,
|
18 |
+
length: int,
|
19 |
+
salt: Optional[bytes],
|
20 |
+
otherinfo: Optional[bytes],
|
21 |
+
backend: Optional[HMACBackend] = ...,
|
22 |
+
): ...
|
23 |
+
def derive(self, key_material: bytes) -> bytes: ...
|
24 |
+
def verify(self, key_material: bytes, expected_key: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/hkdf.pyi
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import HMACBackend
|
4 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
5 |
+
from cryptography.hazmat.primitives.kdf import KeyDerivationFunction
|
6 |
+
|
7 |
+
class HKDF(KeyDerivationFunction):
|
8 |
+
def __init__(
|
9 |
+
self,
|
10 |
+
algorithm: HashAlgorithm,
|
11 |
+
length: int,
|
12 |
+
salt: Optional[bytes],
|
13 |
+
info: Optional[bytes],
|
14 |
+
backend: Optional[HMACBackend] = ...,
|
15 |
+
): ...
|
16 |
+
def derive(self, key_material: bytes) -> bytes: ...
|
17 |
+
def verify(self, key_material: bytes, expected_key: bytes) -> None: ...
|
18 |
+
|
19 |
+
class HKDFExpand(KeyDerivationFunction):
|
20 |
+
def __init__(self, algorithm: HashAlgorithm, length: int, info: Optional[bytes], backend: Optional[HMACBackend] = ...): ...
|
21 |
+
def derive(self, key_material: bytes) -> bytes: ...
|
22 |
+
def verify(self, key_material: bytes, expected_key: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/kbkdf.pyi
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from enum import Enum
|
2 |
+
from typing import Optional
|
3 |
+
|
4 |
+
from cryptography.hazmat.backends.interfaces import HMACBackend
|
5 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
6 |
+
from cryptography.hazmat.primitives.kdf import KeyDerivationFunction
|
7 |
+
|
8 |
+
class Mode(Enum):
|
9 |
+
CounterMode: str
|
10 |
+
|
11 |
+
class CounterLocation(Enum):
|
12 |
+
BeforeFixed: str
|
13 |
+
AfterFixed: str
|
14 |
+
|
15 |
+
class KBKDFHMAC(KeyDerivationFunction):
|
16 |
+
def __init__(
|
17 |
+
self,
|
18 |
+
algorithm: HashAlgorithm,
|
19 |
+
mode: Mode,
|
20 |
+
length: int,
|
21 |
+
rlen: int,
|
22 |
+
llen: int,
|
23 |
+
location: CounterLocation,
|
24 |
+
label: Optional[bytes],
|
25 |
+
context: Optional[bytes],
|
26 |
+
fixed: Optional[bytes],
|
27 |
+
backend: Optional[HMACBackend] = ...,
|
28 |
+
): ...
|
29 |
+
def derive(self, key_material: bytes) -> bytes: ...
|
30 |
+
def verify(self, key_material: bytes, expected_key: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/pbkdf2.pyi
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import PBKDF2HMACBackend
|
4 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
5 |
+
from cryptography.hazmat.primitives.kdf import KeyDerivationFunction
|
6 |
+
|
7 |
+
class PBKDF2HMAC(KeyDerivationFunction):
|
8 |
+
def __init__(
|
9 |
+
self, algorithm: HashAlgorithm, length: int, salt: bytes, iterations: int, backend: Optional[PBKDF2HMACBackend] = ...
|
10 |
+
): ...
|
11 |
+
def derive(self, key_material: bytes) -> bytes: ...
|
12 |
+
def verify(self, key_material: bytes, expected_key: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/scrypt.pyi
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import ScryptBackend
|
4 |
+
from cryptography.hazmat.primitives.kdf import KeyDerivationFunction
|
5 |
+
|
6 |
+
class Scrypt(KeyDerivationFunction):
|
7 |
+
def __init__(self, salt: bytes, length: int, n: int, r: int, p: int, backend: Optional[ScryptBackend] = ...): ...
|
8 |
+
def derive(self, key_material: bytes) -> bytes: ...
|
9 |
+
def verify(self, key_material: bytes, expected_key: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/kdf/x963kdf.pyi
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import HashBackend
|
4 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
5 |
+
from cryptography.hazmat.primitives.kdf import KeyDerivationFunction
|
6 |
+
|
7 |
+
class X963KDF(KeyDerivationFunction):
|
8 |
+
def __init__(
|
9 |
+
self, algorithm: HashAlgorithm, length: int, sharedinfo: Optional[bytes], backend: Optional[HashBackend] = ...
|
10 |
+
): ...
|
11 |
+
def derive(self, key_material: bytes) -> bytes: ...
|
12 |
+
def verify(self, key_material: bytes, expected_key: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/keywrap.pyi
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import CipherBackend
|
4 |
+
|
5 |
+
def aes_key_wrap(wrapping_key: bytes, key_to_wrap: bytes, backend: Optional[CipherBackend] = ...) -> bytes: ...
|
6 |
+
def aes_key_wrap_with_padding(wrapping_key: bytes, key_to_wrap: bytes, backend: Optional[CipherBackend] = ...) -> bytes: ...
|
7 |
+
def aes_key_unwrap(wrapping_key: bytes, wrapped_key: bytes, backend: Optional[CipherBackend] = ...) -> bytes: ...
|
8 |
+
def aes_key_unwrap_with_padding(wrapping_key: bytes, wrapped_key: bytes, backend: Optional[CipherBackend] = ...) -> bytes: ...
|
9 |
+
|
10 |
+
class InvalidUnwrap(Exception): ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/padding.pyi
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta, abstractmethod
|
2 |
+
|
3 |
+
class PaddingContext(metaclass=ABCMeta):
|
4 |
+
@abstractmethod
|
5 |
+
def finalize(self) -> bytes: ...
|
6 |
+
@abstractmethod
|
7 |
+
def update(self, data: bytes) -> bytes: ...
|
8 |
+
|
9 |
+
class ANSIX923(object):
|
10 |
+
def __init__(self, block_size: int) -> None: ...
|
11 |
+
def padder(self) -> PaddingContext: ...
|
12 |
+
def unpadder(self) -> PaddingContext: ...
|
13 |
+
|
14 |
+
class PKCS7(object):
|
15 |
+
def __init__(self, block_size: int) -> None: ...
|
16 |
+
def padder(self) -> PaddingContext: ...
|
17 |
+
def unpadder(self) -> PaddingContext: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/poly1305.pyi
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
class Poly1305(object):
|
2 |
+
def __init__(self, key: bytes) -> None: ...
|
3 |
+
def finalize(self) -> bytes: ...
|
4 |
+
@classmethod
|
5 |
+
def generate_tag(cls, key: bytes, data: bytes) -> bytes: ...
|
6 |
+
def update(self, data: bytes) -> None: ...
|
7 |
+
def verify(self, tag: bytes) -> None: ...
|
8 |
+
@classmethod
|
9 |
+
def verify_tag(cls, key: bytes, data: bytes, tag: bytes) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization/__init__.pyi
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from abc import ABCMeta
|
2 |
+
from enum import Enum
|
3 |
+
from typing import Any, Optional, Union
|
4 |
+
|
5 |
+
from cryptography.hazmat.backends.interfaces import (
|
6 |
+
DERSerializationBackend,
|
7 |
+
DSABackend,
|
8 |
+
EllipticCurveBackend,
|
9 |
+
PEMSerializationBackend,
|
10 |
+
RSABackend,
|
11 |
+
)
|
12 |
+
from cryptography.hazmat.primitives.asymmetric.dh import DHPrivateKey, DHPublicKey
|
13 |
+
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKey, DSAPublicKey
|
14 |
+
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKey, EllipticCurvePublicKey
|
15 |
+
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
|
16 |
+
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey
|
17 |
+
|
18 |
+
def load_pem_private_key(
|
19 |
+
data: bytes, password: Optional[bytes], backend: Optional[PEMSerializationBackend] = ...
|
20 |
+
) -> Any: ... # actually Union[RSAPrivateKey, DSAPrivateKey, DHPrivateKey, EllipticCurvePrivateKey]
|
21 |
+
def load_pem_public_key(
|
22 |
+
data: bytes, backend: Optional[PEMSerializationBackend] = ...
|
23 |
+
) -> Any: ... # actually Union[RSAPublicKey, DSAPublicKey, DHPublicKey, EllipticCurvePublicKey]
|
24 |
+
def load_der_private_key(
|
25 |
+
data: bytes, password: Optional[bytes], backend: Optional[DERSerializationBackend] = ...
|
26 |
+
) -> Any: ... # actually Union[RSAPrivateKey, DSAPrivateKey, DHPrivateKey, EllipticCurvePrivateKey]
|
27 |
+
def load_der_public_key(
|
28 |
+
data: bytes, backend: Optional[DERSerializationBackend] = ...
|
29 |
+
) -> Any: ... # actually Union[RSAPublicKey, DSAPublicKey, DHPublicKey, EllipticCurvePublicKey]
|
30 |
+
def load_ssh_public_key(
|
31 |
+
data: bytes, backend: Union[RSABackend, DSABackend, EllipticCurveBackend, None]
|
32 |
+
) -> Any: ... # actually Union[RSAPublicKey, DSAPublicKey, DHPublicKey, EllipticCurvePublicKey, Ed25519PublicKey]
|
33 |
+
|
34 |
+
class Encoding(Enum):
|
35 |
+
PEM: str
|
36 |
+
DER: str
|
37 |
+
OpenSSH: str
|
38 |
+
Raw: str
|
39 |
+
X962: str
|
40 |
+
|
41 |
+
class PrivateFormat(Enum):
|
42 |
+
PKCS8: str
|
43 |
+
TraditionalOpenSSL: str
|
44 |
+
Raw: str
|
45 |
+
|
46 |
+
class PublicFormat(Enum):
|
47 |
+
SubjectPublicKeyInfo: str
|
48 |
+
PKCS1: str
|
49 |
+
OpenSSH: str
|
50 |
+
Raw: str
|
51 |
+
CompressedPoint: str
|
52 |
+
UncompressedPoint: str
|
53 |
+
|
54 |
+
class ParameterFormat(Enum):
|
55 |
+
PKCS3: str
|
56 |
+
|
57 |
+
class KeySerializationEncryption(metaclass=ABCMeta): ...
|
58 |
+
|
59 |
+
class BestAvailableEncryption(KeySerializationEncryption):
|
60 |
+
password: bytes
|
61 |
+
def __init__(self, password: bytes) -> None: ...
|
62 |
+
|
63 |
+
class NoEncryption(KeySerializationEncryption): ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/serialization/pkcs12.pyi
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any, List, Optional, Tuple, Union
|
2 |
+
|
3 |
+
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKeyWithSerialization
|
4 |
+
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKeyWithSerialization
|
5 |
+
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKeyWithSerialization
|
6 |
+
from cryptography.hazmat.primitives.serialization import KeySerializationEncryption
|
7 |
+
from cryptography.x509 import Certificate
|
8 |
+
|
9 |
+
def load_key_and_certificates(
|
10 |
+
data: bytes, password: Optional[bytes], backend: Optional[Any] = ...
|
11 |
+
) -> Tuple[Optional[Any], Optional[Certificate], List[Certificate]]: ...
|
12 |
+
def serialize_key_and_certificates(
|
13 |
+
name: bytes,
|
14 |
+
key: Union[RSAPrivateKeyWithSerialization, EllipticCurvePrivateKeyWithSerialization, DSAPrivateKeyWithSerialization],
|
15 |
+
cert: Optional[Certificate],
|
16 |
+
cas: Optional[List[Certificate]],
|
17 |
+
enc: KeySerializationEncryption,
|
18 |
+
) -> bytes: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/__init__.pyi
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
class InvalidToken(Exception): ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/hotp.pyi
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import HMACBackend
|
4 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
5 |
+
|
6 |
+
class HOTP(object):
|
7 |
+
def __init__(
|
8 |
+
self, key: bytes, length: int, algorithm: HashAlgorithm, backend: HMACBackend, enforce_key_length: bool = ...
|
9 |
+
): ...
|
10 |
+
def generate(self, counter: int) -> bytes: ...
|
11 |
+
def get_provisioning_uri(self, account_name: str, counter: int, issuer: Optional[str]) -> str: ...
|
12 |
+
def verify(self, hotp: bytes, counter: int) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/hazmat/primitives/twofactor/totp.pyi
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.backends.interfaces import HMACBackend
|
4 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
5 |
+
|
6 |
+
class TOTP(object):
|
7 |
+
def __init__(
|
8 |
+
self,
|
9 |
+
key: bytes,
|
10 |
+
length: int,
|
11 |
+
algorithm: HashAlgorithm,
|
12 |
+
time_step: int,
|
13 |
+
backend: HMACBackend,
|
14 |
+
enforce_key_length: bool = ...,
|
15 |
+
): ...
|
16 |
+
def generate(self, time: int) -> bytes: ...
|
17 |
+
def get_provisioning_uri(self, account_name: str, issuer: Optional[str]) -> str: ...
|
18 |
+
def verify(self, totp: bytes, time: int) -> None: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/x509/__init__.pyi
ADDED
@@ -0,0 +1,420 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datetime
|
2 |
+
from abc import ABCMeta, abstractmethod
|
3 |
+
from enum import Enum
|
4 |
+
from ipaddress import IPv4Address, IPv4Network, IPv6Address, IPv6Network
|
5 |
+
from typing import Any, ClassVar, Generator, Generic, Iterable, List, Optional, Sequence, Text, Type, TypeVar, Union
|
6 |
+
|
7 |
+
from cryptography.hazmat.backends.interfaces import X509Backend
|
8 |
+
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPrivateKey, DSAPublicKey
|
9 |
+
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePrivateKey, EllipticCurvePublicKey
|
10 |
+
from cryptography.hazmat.primitives.asymmetric.ed448 import Ed448PrivateKey, Ed448PublicKey
|
11 |
+
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey, Ed25519PublicKey
|
12 |
+
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey, RSAPublicKey
|
13 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
14 |
+
from cryptography.hazmat.primitives.serialization import Encoding
|
15 |
+
|
16 |
+
class ObjectIdentifier(object):
|
17 |
+
dotted_string: str
|
18 |
+
def __init__(self, dotted_string: str) -> None: ...
|
19 |
+
|
20 |
+
class CRLEntryExtensionOID(object):
|
21 |
+
CERTIFICATE_ISSUER: ClassVar[ObjectIdentifier]
|
22 |
+
CRL_REASON: ClassVar[ObjectIdentifier]
|
23 |
+
INVALIDITY_DATE: ClassVar[ObjectIdentifier]
|
24 |
+
|
25 |
+
class ExtensionOID(object):
|
26 |
+
AUTHORITY_INFORMATION_ACCESS: ClassVar[ObjectIdentifier]
|
27 |
+
AUTHORITY_KEY_IDENTIFIER: ClassVar[ObjectIdentifier]
|
28 |
+
BASIC_CONSTRAINTS: ClassVar[ObjectIdentifier]
|
29 |
+
CERTIFICATE_POLICIES: ClassVar[ObjectIdentifier]
|
30 |
+
CRL_DISTRIBUTION_POINTS: ClassVar[ObjectIdentifier]
|
31 |
+
CRL_NUMBER: ClassVar[ObjectIdentifier]
|
32 |
+
DELTA_CRL_INDICATOR: ClassVar[ObjectIdentifier]
|
33 |
+
EXTENDED_KEY_USAGE: ClassVar[ObjectIdentifier]
|
34 |
+
FRESHEST_CRL: ClassVar[ObjectIdentifier]
|
35 |
+
INHIBIT_ANY_POLICY: ClassVar[ObjectIdentifier]
|
36 |
+
ISSUER_ALTERNATIVE_NAME: ClassVar[ObjectIdentifier]
|
37 |
+
ISSUING_DISTRIBUTION_POINT: ClassVar[ObjectIdentifier]
|
38 |
+
KEY_USAGE: ClassVar[ObjectIdentifier]
|
39 |
+
NAME_CONSTRAINTS: ClassVar[ObjectIdentifier]
|
40 |
+
OCSP_NO_CHECK: ClassVar[ObjectIdentifier]
|
41 |
+
POLICY_CONSTRAINTS: ClassVar[ObjectIdentifier]
|
42 |
+
POLICY_MAPPINGS: ClassVar[ObjectIdentifier]
|
43 |
+
PRECERT_POISON: ClassVar[ObjectIdentifier]
|
44 |
+
PRECERT_SIGNED_CERTIFICATE_TIMESTAMPS: ClassVar[ObjectIdentifier]
|
45 |
+
SUBJECT_ALTERNATIVE_NAME: ClassVar[ObjectIdentifier]
|
46 |
+
SUBJECT_DIRECTORY_ATTRIBUTES: ClassVar[ObjectIdentifier]
|
47 |
+
SUBJECT_INFORMATION_ACCESS: ClassVar[ObjectIdentifier]
|
48 |
+
SUBJECT_KEY_IDENTIFIER: ClassVar[ObjectIdentifier]
|
49 |
+
TLS_FEATURE: ClassVar[ObjectIdentifier]
|
50 |
+
|
51 |
+
class NameOID(object):
|
52 |
+
BUSINESS_CATEGORY: ClassVar[ObjectIdentifier]
|
53 |
+
COMMON_NAME: ClassVar[ObjectIdentifier]
|
54 |
+
COUNTRY_NAME: ClassVar[ObjectIdentifier]
|
55 |
+
DN_QUALIFIER: ClassVar[ObjectIdentifier]
|
56 |
+
DOMAIN_COMPONENT: ClassVar[ObjectIdentifier]
|
57 |
+
EMAIL_ADDRESS: ClassVar[ObjectIdentifier]
|
58 |
+
GENERATION_QUALIFIER: ClassVar[ObjectIdentifier]
|
59 |
+
GIVEN_NAME: ClassVar[ObjectIdentifier]
|
60 |
+
JURISDICTION_COUNTRY_NAME: ClassVar[ObjectIdentifier]
|
61 |
+
JURISDICTION_LOCALITY_NAME: ClassVar[ObjectIdentifier]
|
62 |
+
JURISDICTION_STATE_OR_PROVINCE_NAME: ClassVar[ObjectIdentifier]
|
63 |
+
LOCALITY_NAME: ClassVar[ObjectIdentifier]
|
64 |
+
ORGANIZATIONAL_UNIT_NAME: ClassVar[ObjectIdentifier]
|
65 |
+
ORGANIZATION_NAME: ClassVar[ObjectIdentifier]
|
66 |
+
POSTAL_ADDRESS: ClassVar[ObjectIdentifier]
|
67 |
+
POSTAL_CODE: ClassVar[ObjectIdentifier]
|
68 |
+
PSEUDONYM: ClassVar[ObjectIdentifier]
|
69 |
+
SERIAL_NUMBER: ClassVar[ObjectIdentifier]
|
70 |
+
STATE_OR_PROVINCE_NAME: ClassVar[ObjectIdentifier]
|
71 |
+
STREET_ADDRESS: ClassVar[ObjectIdentifier]
|
72 |
+
SURNAME: ClassVar[ObjectIdentifier]
|
73 |
+
TITLE: ClassVar[ObjectIdentifier]
|
74 |
+
USER_ID: ClassVar[ObjectIdentifier]
|
75 |
+
X500_UNIQUE_IDENTIFIER: ClassVar[ObjectIdentifier]
|
76 |
+
|
77 |
+
class OCSPExtensionOID(object):
|
78 |
+
NONCE: ClassVar[ObjectIdentifier]
|
79 |
+
|
80 |
+
class SignatureAlgorithmOID(object):
|
81 |
+
DSA_WITH_SHA1: ClassVar[ObjectIdentifier]
|
82 |
+
DSA_WITH_SHA224: ClassVar[ObjectIdentifier]
|
83 |
+
DSA_WITH_SHA256: ClassVar[ObjectIdentifier]
|
84 |
+
ECDSA_WITH_SHA1: ClassVar[ObjectIdentifier]
|
85 |
+
ECDSA_WITH_SHA224: ClassVar[ObjectIdentifier]
|
86 |
+
ECDSA_WITH_SHA256: ClassVar[ObjectIdentifier]
|
87 |
+
ECDSA_WITH_SHA384: ClassVar[ObjectIdentifier]
|
88 |
+
ECDSA_WITH_SHA512: ClassVar[ObjectIdentifier]
|
89 |
+
ED25519: ClassVar[ObjectIdentifier]
|
90 |
+
ED448: ClassVar[ObjectIdentifier]
|
91 |
+
RSASSA_PSS: ClassVar[ObjectIdentifier]
|
92 |
+
RSA_WITH_MD5: ClassVar[ObjectIdentifier]
|
93 |
+
RSA_WITH_SHA1: ClassVar[ObjectIdentifier]
|
94 |
+
RSA_WITH_SHA224: ClassVar[ObjectIdentifier]
|
95 |
+
RSA_WITH_SHA256: ClassVar[ObjectIdentifier]
|
96 |
+
RSA_WITH_SHA384: ClassVar[ObjectIdentifier]
|
97 |
+
RSA_WITH_SHA512: ClassVar[ObjectIdentifier]
|
98 |
+
|
99 |
+
class ExtendedKeyUsageOID(object):
|
100 |
+
SERVER_AUTH: ClassVar[ObjectIdentifier]
|
101 |
+
CLIENT_AUTH: ClassVar[ObjectIdentifier]
|
102 |
+
CODE_SIGNING: ClassVar[ObjectIdentifier]
|
103 |
+
EMAIL_PROTECTION: ClassVar[ObjectIdentifier]
|
104 |
+
TIME_STAMPING: ClassVar[ObjectIdentifier]
|
105 |
+
OCSP_SIGNING: ClassVar[ObjectIdentifier]
|
106 |
+
ANY_EXTENDED_KEY_USAGE: ClassVar[ObjectIdentifier]
|
107 |
+
|
108 |
+
class NameAttribute(object):
|
109 |
+
oid: ObjectIdentifier
|
110 |
+
value: Text
|
111 |
+
def __init__(self, oid: ObjectIdentifier, value: Text) -> None: ...
|
112 |
+
def rfc4514_string(self) -> str: ...
|
113 |
+
|
114 |
+
class RelativeDistinguishedName(object):
|
115 |
+
def __init__(self, attributes: List[NameAttribute]) -> None: ...
|
116 |
+
def __iter__(self) -> Generator[NameAttribute, None, None]: ...
|
117 |
+
def get_attributes_for_oid(self, oid: ObjectIdentifier) -> List[NameAttribute]: ...
|
118 |
+
def rfc4514_string(self) -> str: ...
|
119 |
+
|
120 |
+
class Name(object):
|
121 |
+
rdns: List[RelativeDistinguishedName]
|
122 |
+
def __init__(self, attributes: Sequence[Union[NameAttribute, RelativeDistinguishedName]]) -> None: ...
|
123 |
+
def __iter__(self) -> Generator[NameAttribute, None, None]: ...
|
124 |
+
def __len__(self) -> int: ...
|
125 |
+
def get_attributes_for_oid(self, oid: ObjectIdentifier) -> List[NameAttribute]: ...
|
126 |
+
def public_bytes(self, backend: Optional[X509Backend] = ...) -> bytes: ...
|
127 |
+
def rfc4514_string(self) -> str: ...
|
128 |
+
|
129 |
+
class Version(Enum):
|
130 |
+
v1: int
|
131 |
+
v3: int
|
132 |
+
|
133 |
+
class Certificate(metaclass=ABCMeta):
|
134 |
+
extensions: Extensions
|
135 |
+
issuer: Name
|
136 |
+
not_valid_after: datetime.datetime
|
137 |
+
not_valid_before: datetime.datetime
|
138 |
+
serial_number: int
|
139 |
+
signature: bytes
|
140 |
+
signature_algorithm_oid: ObjectIdentifier
|
141 |
+
signature_hash_algorithm: HashAlgorithm
|
142 |
+
tbs_certificate_bytes: bytes
|
143 |
+
subject: Name
|
144 |
+
version: Version
|
145 |
+
@abstractmethod
|
146 |
+
def fingerprint(self, algorithm: HashAlgorithm) -> bytes: ...
|
147 |
+
@abstractmethod
|
148 |
+
def public_bytes(self, encoding: Encoding) -> bytes: ...
|
149 |
+
@abstractmethod
|
150 |
+
def public_key(self) -> Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey]: ...
|
151 |
+
|
152 |
+
class CertificateBuilder(object):
|
153 |
+
def __init__(
|
154 |
+
self,
|
155 |
+
issuer_name: Optional[Name] = ...,
|
156 |
+
subject_name: Optional[Name] = ...,
|
157 |
+
public_key: Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey, None] = ...,
|
158 |
+
serial_number: Optional[int] = ...,
|
159 |
+
not_valid_before: Optional[datetime.datetime] = ...,
|
160 |
+
not_valid_after: Optional[datetime.datetime] = ...,
|
161 |
+
extensions: Optional[Iterable[ExtensionType]] = ...,
|
162 |
+
) -> None: ...
|
163 |
+
def add_extension(self, extension: ExtensionType, critical: bool) -> CertificateBuilder: ...
|
164 |
+
def issuer_name(self, name: Name) -> CertificateBuilder: ...
|
165 |
+
def not_valid_after(self, time: datetime.datetime) -> CertificateBuilder: ...
|
166 |
+
def not_valid_before(self, time: datetime.datetime) -> CertificateBuilder: ...
|
167 |
+
def public_key(
|
168 |
+
self, public_key: Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey]
|
169 |
+
) -> CertificateBuilder: ...
|
170 |
+
def serial_number(self, serial_number: int) -> CertificateBuilder: ...
|
171 |
+
def sign(
|
172 |
+
self,
|
173 |
+
private_key: Union[DSAPrivateKey, Ed25519PrivateKey, Ed448PrivateKey, EllipticCurvePrivateKey, RSAPrivateKey],
|
174 |
+
algorithm: Optional[HashAlgorithm],
|
175 |
+
backend: Optional[X509Backend] = ...,
|
176 |
+
) -> Certificate: ...
|
177 |
+
def subject_name(self, name: Name) -> CertificateBuilder: ...
|
178 |
+
|
179 |
+
class CertificateRevocationList(metaclass=ABCMeta):
|
180 |
+
extensions: Extensions
|
181 |
+
issuer: Name
|
182 |
+
last_update: datetime.datetime
|
183 |
+
next_update: datetime.datetime
|
184 |
+
signature: bytes
|
185 |
+
signature_algorithm_oid: ObjectIdentifier
|
186 |
+
signature_hash_algorithm: HashAlgorithm
|
187 |
+
tbs_certlist_bytes: bytes
|
188 |
+
@abstractmethod
|
189 |
+
def fingerprint(self, algorithm: HashAlgorithm) -> bytes: ...
|
190 |
+
@abstractmethod
|
191 |
+
def get_revoked_certificate_by_serial_number(self, serial_number: int) -> RevokedCertificate: ...
|
192 |
+
@abstractmethod
|
193 |
+
def is_signature_valid(
|
194 |
+
self, public_key: Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey]
|
195 |
+
) -> bool: ...
|
196 |
+
@abstractmethod
|
197 |
+
def public_bytes(self, encoding: Encoding) -> bytes: ...
|
198 |
+
|
199 |
+
class CertificateRevocationListBuilder(object):
|
200 |
+
def add_extension(self, extension: ExtensionType, critical: bool) -> CertificateRevocationListBuilder: ...
|
201 |
+
def add_revoked_certificate(self, revoked_certificate: RevokedCertificate) -> CertificateRevocationListBuilder: ...
|
202 |
+
def issuer_name(self, name: Name) -> CertificateRevocationListBuilder: ...
|
203 |
+
def last_update(self, time: datetime.datetime) -> CertificateRevocationListBuilder: ...
|
204 |
+
def next_update(self, time: datetime.datetime) -> CertificateRevocationListBuilder: ...
|
205 |
+
def sign(
|
206 |
+
self,
|
207 |
+
private_key: Union[DSAPrivateKey, Ed25519PrivateKey, Ed448PrivateKey, EllipticCurvePrivateKey, RSAPrivateKey],
|
208 |
+
algorithm: Optional[HashAlgorithm],
|
209 |
+
backend: Optional[X509Backend] = ...,
|
210 |
+
) -> CertificateRevocationList: ...
|
211 |
+
|
212 |
+
class CertificateSigningRequest(metaclass=ABCMeta):
|
213 |
+
extensions: Extensions
|
214 |
+
is_signature_valid: bool
|
215 |
+
signature: bytes
|
216 |
+
signature_algorithm_oid: ObjectIdentifier
|
217 |
+
signature_hash_algorithm: HashAlgorithm
|
218 |
+
subject: Name
|
219 |
+
tbs_certrequest_bytes: bytes
|
220 |
+
@abstractmethod
|
221 |
+
def public_bytes(self, encoding: Encoding) -> bytes: ...
|
222 |
+
@abstractmethod
|
223 |
+
def public_key(self) -> Union[DSAPublicKey, Ed25519PublicKey, Ed448PublicKey, EllipticCurvePublicKey, RSAPublicKey]: ...
|
224 |
+
|
225 |
+
class CertificateSigningRequestBuilder(object):
|
226 |
+
def add_extension(self, extension: ExtensionType, critical: bool) -> CertificateSigningRequestBuilder: ...
|
227 |
+
def subject_name(self, name: Name) -> CertificateSigningRequestBuilder: ...
|
228 |
+
def sign(
|
229 |
+
self,
|
230 |
+
private_key: Union[DSAPrivateKey, Ed25519PrivateKey, Ed448PrivateKey, EllipticCurvePrivateKey, RSAPrivateKey],
|
231 |
+
algorithm: Optional[HashAlgorithm],
|
232 |
+
backend: Optional[X509Backend] = ...,
|
233 |
+
) -> CertificateSigningRequest: ...
|
234 |
+
|
235 |
+
class RevokedCertificate(metaclass=ABCMeta):
|
236 |
+
extensions: Extensions
|
237 |
+
revocation_date: datetime.datetime
|
238 |
+
serial_number: int
|
239 |
+
|
240 |
+
class RevokedCertificateBuilder(object):
|
241 |
+
def add_extension(self, extension: ExtensionType, critical: bool) -> RevokedCertificateBuilder: ...
|
242 |
+
def build(self, backend: Optional[X509Backend] = ...) -> RevokedCertificate: ...
|
243 |
+
def revocation_date(self, time: datetime.datetime) -> RevokedCertificateBuilder: ...
|
244 |
+
def serial_number(self, serial_number: int) -> RevokedCertificateBuilder: ...
|
245 |
+
|
246 |
+
# General Name Classes
|
247 |
+
|
248 |
+
class GeneralName(metaclass=ABCMeta):
|
249 |
+
value: Any
|
250 |
+
|
251 |
+
class DirectoryName(GeneralName):
|
252 |
+
value: Name
|
253 |
+
def __init__(self, value: Name) -> None: ...
|
254 |
+
|
255 |
+
class DNSName(GeneralName):
|
256 |
+
value: Text
|
257 |
+
def __init__(self, value: Text) -> None: ...
|
258 |
+
|
259 |
+
class IPAddress(GeneralName):
|
260 |
+
value: Union[IPv4Address, IPv6Address, IPv4Network, IPv6Network]
|
261 |
+
def __init__(self, value: Union[IPv4Address, IPv6Address, IPv4Network, IPv6Network]) -> None: ...
|
262 |
+
|
263 |
+
class OtherName(GeneralName):
|
264 |
+
type_id: ObjectIdentifier
|
265 |
+
value: bytes
|
266 |
+
def __init__(self, type_id: ObjectIdentifier, value: bytes) -> None: ...
|
267 |
+
|
268 |
+
class RegisteredID(GeneralName):
|
269 |
+
value: ObjectIdentifier
|
270 |
+
def __init__(self, value: ObjectIdentifier) -> None: ...
|
271 |
+
|
272 |
+
class RFC822Name(GeneralName):
|
273 |
+
value: Text
|
274 |
+
def __init__(self, value: Text) -> None: ...
|
275 |
+
|
276 |
+
class UniformResourceIdentifier(GeneralName):
|
277 |
+
value: Text
|
278 |
+
def __init__(self, value: Text) -> None: ...
|
279 |
+
|
280 |
+
# X.509 Extensions
|
281 |
+
|
282 |
+
class ExtensionType(metaclass=ABCMeta):
|
283 |
+
oid: ObjectIdentifier
|
284 |
+
|
285 |
+
_T = TypeVar("_T", bound="ExtensionType")
|
286 |
+
|
287 |
+
class Extension(Generic[_T]):
|
288 |
+
critical: bool
|
289 |
+
oid: ObjectIdentifier
|
290 |
+
value: _T
|
291 |
+
|
292 |
+
class Extensions(object):
|
293 |
+
def __init__(self, general_names: List[Extension[Any]]) -> None: ...
|
294 |
+
def __iter__(self) -> Generator[Extension[Any], None, None]: ...
|
295 |
+
def get_extension_for_oid(self, oid: ObjectIdentifier) -> Extension[Any]: ...
|
296 |
+
def get_extension_for_class(self, extclass: Type[_T]) -> Extension[_T]: ...
|
297 |
+
|
298 |
+
class DuplicateExtension(Exception):
|
299 |
+
oid: ObjectIdentifier
|
300 |
+
def __init__(self, msg: str, oid: ObjectIdentifier) -> None: ...
|
301 |
+
|
302 |
+
class ExtensionNotFound(Exception):
|
303 |
+
oid: ObjectIdentifier
|
304 |
+
def __init__(self, msg: str, oid: ObjectIdentifier) -> None: ...
|
305 |
+
|
306 |
+
class IssuerAlternativeName(ExtensionType):
|
307 |
+
def __init__(self, general_names: List[GeneralName]) -> None: ...
|
308 |
+
def __iter__(self) -> Generator[GeneralName, None, None]: ...
|
309 |
+
def get_values_for_type(self, type: Type[GeneralName]) -> List[Any]: ...
|
310 |
+
|
311 |
+
class SubjectAlternativeName(ExtensionType):
|
312 |
+
def __init__(self, general_names: List[GeneralName]) -> None: ...
|
313 |
+
def __iter__(self) -> Generator[GeneralName, None, None]: ...
|
314 |
+
def get_values_for_type(self, type: Type[GeneralName]) -> List[Any]: ...
|
315 |
+
|
316 |
+
class AuthorityKeyIdentifier(ExtensionType):
|
317 |
+
@property
|
318 |
+
def key_identifier(self) -> bytes: ...
|
319 |
+
@property
|
320 |
+
def authority_cert_issuer(self) -> Optional[List[GeneralName]]: ...
|
321 |
+
@property
|
322 |
+
def authority_cert_serial_number(self) -> Optional[int]: ...
|
323 |
+
def __init__(
|
324 |
+
self,
|
325 |
+
key_identifier: bytes,
|
326 |
+
authority_cert_issuer: Optional[Iterable[GeneralName]],
|
327 |
+
authority_cert_serial_number: Optional[int],
|
328 |
+
) -> None: ...
|
329 |
+
@classmethod
|
330 |
+
def from_issuer_public_key(
|
331 |
+
cls, public_key: Union[RSAPublicKey, DSAPublicKey, EllipticCurvePublicKey, Ed25519PublicKey, Ed448PublicKey]
|
332 |
+
) -> AuthorityKeyIdentifier: ...
|
333 |
+
@classmethod
|
334 |
+
def from_issuer_subject_key_identifier(cls, ski: SubjectKeyIdentifier) -> AuthorityKeyIdentifier: ...
|
335 |
+
|
336 |
+
class SubjectKeyIdentifier(ExtensionType):
|
337 |
+
@property
|
338 |
+
def digest(self) -> bytes: ...
|
339 |
+
def __init__(self, digest: bytes) -> None: ...
|
340 |
+
@classmethod
|
341 |
+
def from_public_key(
|
342 |
+
cls, public_key: Union[RSAPublicKey, DSAPublicKey, EllipticCurvePublicKey, Ed25519PublicKey, Ed448PublicKey]
|
343 |
+
) -> SubjectKeyIdentifier: ...
|
344 |
+
|
345 |
+
class AccessDescription:
|
346 |
+
@property
|
347 |
+
def access_method(self) -> ObjectIdentifier: ...
|
348 |
+
@property
|
349 |
+
def access_location(self) -> GeneralName: ...
|
350 |
+
def __init__(self, access_method: ObjectIdentifier, access_location: GeneralName) -> None: ...
|
351 |
+
|
352 |
+
class AuthorityInformationAccess(ExtensionType):
|
353 |
+
def __init__(self, descriptions: Iterable[AccessDescription]) -> None: ...
|
354 |
+
def __len__(self) -> int: ...
|
355 |
+
def __iter__(self) -> Generator[AccessDescription, None, None]: ...
|
356 |
+
def __getitem__(self, item: int) -> AccessDescription: ...
|
357 |
+
|
358 |
+
class SubjectInformationAccess(ExtensionType):
|
359 |
+
def __init__(self, descriptions: Iterable[AccessDescription]) -> None: ...
|
360 |
+
def __len__(self) -> int: ...
|
361 |
+
def __iter__(self) -> Generator[AccessDescription, None, None]: ...
|
362 |
+
def __getitem__(self, item: int) -> AccessDescription: ...
|
363 |
+
|
364 |
+
class BasicConstraints(ExtensionType):
|
365 |
+
@property
|
366 |
+
def ca(self) -> bool: ...
|
367 |
+
@property
|
368 |
+
def path_length(self) -> Optional[int]: ...
|
369 |
+
def __init__(self, ca: bool, path_length: Optional[int]) -> None: ...
|
370 |
+
|
371 |
+
class KeyUsage(ExtensionType):
|
372 |
+
@property
|
373 |
+
def digital_signature(self) -> bool: ...
|
374 |
+
@property
|
375 |
+
def content_commitment(self) -> bool: ...
|
376 |
+
@property
|
377 |
+
def key_encipherment(self) -> bool: ...
|
378 |
+
@property
|
379 |
+
def data_encipherment(self) -> bool: ...
|
380 |
+
@property
|
381 |
+
def key_agreement(self) -> bool: ...
|
382 |
+
@property
|
383 |
+
def key_cert_sign(self) -> bool: ...
|
384 |
+
@property
|
385 |
+
def crl_sign(self) -> bool: ...
|
386 |
+
@property
|
387 |
+
def encipher_only(self) -> bool: ...
|
388 |
+
@property
|
389 |
+
def decipher_only(self) -> bool: ...
|
390 |
+
def __init__(
|
391 |
+
self,
|
392 |
+
digital_signature: bool,
|
393 |
+
content_commitment: bool,
|
394 |
+
key_encipherment: bool,
|
395 |
+
data_encipherment: bool,
|
396 |
+
key_agreement: bool,
|
397 |
+
key_cert_sign: bool,
|
398 |
+
crl_sign: bool,
|
399 |
+
encipher_only: bool,
|
400 |
+
decipher_only: bool,
|
401 |
+
) -> None: ...
|
402 |
+
|
403 |
+
class ExtendedKeyUsage(ExtensionType):
|
404 |
+
def __init__(self, usages: Iterable[ObjectIdentifier]) -> None: ...
|
405 |
+
def __len__(self) -> int: ...
|
406 |
+
def __iter__(self) -> Generator[ObjectIdentifier, None, None]: ...
|
407 |
+
def __getitem__(self, item: int) -> ObjectIdentifier: ...
|
408 |
+
|
409 |
+
class UnrecognizedExtension(ExtensionType):
|
410 |
+
@property
|
411 |
+
def value(self) -> bytes: ...
|
412 |
+
def __init__(self, oid: ObjectIdentifier, value: bytes) -> None: ...
|
413 |
+
|
414 |
+
def load_der_x509_certificate(data: bytes, backend: Optional[X509Backend] = ...) -> Certificate: ...
|
415 |
+
def load_pem_x509_certificate(data: bytes, backend: Optional[X509Backend] = ...) -> Certificate: ...
|
416 |
+
def load_der_x509_crl(data: bytes, backend: Optional[X509Backend] = ...) -> CertificateRevocationList: ...
|
417 |
+
def load_pem_x509_crl(data: bytes, backend: Optional[X509Backend] = ...) -> CertificateRevocationList: ...
|
418 |
+
def load_der_x509_csr(data: bytes, backend: Optional[X509Backend] = ...) -> CertificateSigningRequest: ...
|
419 |
+
def load_pem_x509_csr(data: bytes, backend: Optional[X509Backend] = ...) -> CertificateSigningRequest: ...
|
420 |
+
def __getattr__(name: str) -> Any: ... # incomplete
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/x509/extensions.pyi
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any, Iterator
|
2 |
+
|
3 |
+
from cryptography.x509 import GeneralName, ObjectIdentifier
|
4 |
+
|
5 |
+
class Extension:
|
6 |
+
value: Any = ...
|
7 |
+
|
8 |
+
class GeneralNames:
|
9 |
+
def __iter__(self) -> Iterator[GeneralName]: ...
|
10 |
+
|
11 |
+
class DistributionPoint:
|
12 |
+
full_name: GeneralNames = ...
|
13 |
+
|
14 |
+
class CRLDistributionPoints:
|
15 |
+
def __iter__(self) -> Iterator[DistributionPoint]: ...
|
16 |
+
|
17 |
+
class AccessDescription:
|
18 |
+
access_method: ObjectIdentifier = ...
|
19 |
+
access_location: GeneralName = ...
|
20 |
+
|
21 |
+
class AuthorityInformationAccess:
|
22 |
+
def __iter__(self) -> Iterator[AccessDescription]: ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/cryptography/x509/oid.pyi
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Dict, Optional
|
2 |
+
|
3 |
+
from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
4 |
+
from cryptography.x509 import ObjectIdentifier
|
5 |
+
|
6 |
+
class ExtensionOID:
|
7 |
+
SUBJECT_DIRECTORY_ATTRIBUTES: ObjectIdentifier = ...
|
8 |
+
SUBJECT_KEY_IDENTIFIER: ObjectIdentifier = ...
|
9 |
+
KEY_USAGE: ObjectIdentifier = ...
|
10 |
+
SUBJECT_ALTERNATIVE_NAME: ObjectIdentifier = ...
|
11 |
+
ISSUER_ALTERNATIVE_NAME: ObjectIdentifier = ...
|
12 |
+
BASIC_CONSTRAINTS: ObjectIdentifier = ...
|
13 |
+
NAME_CONSTRAINTS: ObjectIdentifier = ...
|
14 |
+
CRL_DISTRIBUTION_POINTS: ObjectIdentifier = ...
|
15 |
+
CERTIFICATE_POLICIES: ObjectIdentifier = ...
|
16 |
+
POLICY_MAPPINGS: ObjectIdentifier = ...
|
17 |
+
AUTHORITY_KEY_IDENTIFIER: ObjectIdentifier = ...
|
18 |
+
POLICY_CONSTRAINTS: ObjectIdentifier = ...
|
19 |
+
EXTENDED_KEY_USAGE: ObjectIdentifier = ...
|
20 |
+
FRESHEST_CRL: ObjectIdentifier = ...
|
21 |
+
INHIBIT_ANY_POLICY: ObjectIdentifier = ...
|
22 |
+
ISSUING_DISTRIBUTION_POINT: ObjectIdentifier = ...
|
23 |
+
AUTHORITY_INFORMATION_ACCESS: ObjectIdentifier = ...
|
24 |
+
SUBJECT_INFORMATION_ACCESS: ObjectIdentifier = ...
|
25 |
+
OCSP_NO_CHECK: ObjectIdentifier = ...
|
26 |
+
TLS_FEATURE: ObjectIdentifier = ...
|
27 |
+
CRL_NUMBER: ObjectIdentifier = ...
|
28 |
+
DELTA_CRL_INDICATOR: ObjectIdentifier = ...
|
29 |
+
PRECERT_SIGNED_CERTIFICATE_TIMESTAMPS: ObjectIdentifier = ...
|
30 |
+
PRECERT_POISON: ObjectIdentifier = ...
|
31 |
+
|
32 |
+
class OCSPExtensionOID:
|
33 |
+
NONCE: ObjectIdentifier = ...
|
34 |
+
|
35 |
+
class CRLEntryExtensionOID:
|
36 |
+
CERTIFICATE_ISSUER: ObjectIdentifier = ...
|
37 |
+
CRL_REASON: ObjectIdentifier = ...
|
38 |
+
INVALIDITY_DATE: ObjectIdentifier = ...
|
39 |
+
|
40 |
+
class NameOID:
|
41 |
+
COMMON_NAME: ObjectIdentifier = ...
|
42 |
+
COUNTRY_NAME: ObjectIdentifier = ...
|
43 |
+
LOCALITY_NAME: ObjectIdentifier = ...
|
44 |
+
STATE_OR_PROVINCE_NAME: ObjectIdentifier = ...
|
45 |
+
STREET_ADDRESS: ObjectIdentifier = ...
|
46 |
+
ORGANIZATION_NAME: ObjectIdentifier = ...
|
47 |
+
ORGANIZATIONAL_UNIT_NAME: ObjectIdentifier = ...
|
48 |
+
SERIAL_NUMBER: ObjectIdentifier = ...
|
49 |
+
SURNAME: ObjectIdentifier = ...
|
50 |
+
GIVEN_NAME: ObjectIdentifier = ...
|
51 |
+
TITLE: ObjectIdentifier = ...
|
52 |
+
GENERATION_QUALIFIER: ObjectIdentifier = ...
|
53 |
+
X500_UNIQUE_IDENTIFIER: ObjectIdentifier = ...
|
54 |
+
DN_QUALIFIER: ObjectIdentifier = ...
|
55 |
+
PSEUDONYM: ObjectIdentifier = ...
|
56 |
+
USER_ID: ObjectIdentifier = ...
|
57 |
+
DOMAIN_COMPONENT: ObjectIdentifier = ...
|
58 |
+
EMAIL_ADDRESS: ObjectIdentifier = ...
|
59 |
+
JURISDICTION_COUNTRY_NAME: ObjectIdentifier = ...
|
60 |
+
JURISDICTION_LOCALITY_NAME: ObjectIdentifier = ...
|
61 |
+
JURISDICTION_STATE_OR_PROVINCE_NAME: ObjectIdentifier = ...
|
62 |
+
BUSINESS_CATEGORY: ObjectIdentifier = ...
|
63 |
+
POSTAL_ADDRESS: ObjectIdentifier = ...
|
64 |
+
POSTAL_CODE: ObjectIdentifier = ...
|
65 |
+
|
66 |
+
class SignatureAlgorithmOID:
|
67 |
+
RSA_WITH_MD5: ObjectIdentifier = ...
|
68 |
+
RSA_WITH_SHA1: ObjectIdentifier = ...
|
69 |
+
_RSA_WITH_SHA1: ObjectIdentifier = ...
|
70 |
+
RSA_WITH_SHA224: ObjectIdentifier = ...
|
71 |
+
RSA_WITH_SHA256: ObjectIdentifier = ...
|
72 |
+
RSA_WITH_SHA384: ObjectIdentifier = ...
|
73 |
+
RSA_WITH_SHA512: ObjectIdentifier = ...
|
74 |
+
RSASSA_PSS: ObjectIdentifier = ...
|
75 |
+
ECDSA_WITH_SHA1: ObjectIdentifier = ...
|
76 |
+
ECDSA_WITH_SHA224: ObjectIdentifier = ...
|
77 |
+
ECDSA_WITH_SHA256: ObjectIdentifier = ...
|
78 |
+
ECDSA_WITH_SHA384: ObjectIdentifier = ...
|
79 |
+
ECDSA_WITH_SHA512: ObjectIdentifier = ...
|
80 |
+
DSA_WITH_SHA1: ObjectIdentifier = ...
|
81 |
+
DSA_WITH_SHA224: ObjectIdentifier = ...
|
82 |
+
DSA_WITH_SHA256: ObjectIdentifier = ...
|
83 |
+
ED25519: ObjectIdentifier = ...
|
84 |
+
ED448: ObjectIdentifier = ...
|
85 |
+
|
86 |
+
class ExtendedKeyUsageOID:
|
87 |
+
SERVER_AUTH: ObjectIdentifier = ...
|
88 |
+
CLIENT_AUTH: ObjectIdentifier = ...
|
89 |
+
CODE_SIGNING: ObjectIdentifier = ...
|
90 |
+
EMAIL_PROTECTION: ObjectIdentifier = ...
|
91 |
+
TIME_STAMPING: ObjectIdentifier = ...
|
92 |
+
OCSP_SIGNING: ObjectIdentifier = ...
|
93 |
+
ANY_EXTENDED_KEY_USAGE: ObjectIdentifier = ...
|
94 |
+
|
95 |
+
class AuthorityInformationAccessOID:
|
96 |
+
CA_ISSUERS: ObjectIdentifier = ...
|
97 |
+
OCSP: ObjectIdentifier = ...
|
98 |
+
|
99 |
+
class CertificatePoliciesOID:
|
100 |
+
CPS_QUALIFIER: ObjectIdentifier = ...
|
101 |
+
CPS_USER_NOTICE: ObjectIdentifier = ...
|
102 |
+
ANY_POLICY: ObjectIdentifier = ...
|
103 |
+
|
104 |
+
_OID_NAMES: Dict[ObjectIdentifier, str] = ...
|
105 |
+
|
106 |
+
_SIG_OIDS_TO_HASH: Dict[ObjectIdentifier, Optional[HashAlgorithm]] = ...
|
temp_venv/lib/python3.13/site-packages/jedi/third_party/typeshed/third_party/2and3/flask/json/__init__.pyi
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json as _json
|
2 |
+
from typing import Any
|
3 |
+
|
4 |
+
from jinja2 import Markup
|
5 |
+
|
6 |
+
class JSONEncoder(_json.JSONEncoder):
|
7 |
+
def default(self, o: Any): ...
|
8 |
+
|
9 |
+
class JSONDecoder(_json.JSONDecoder): ...
|
10 |
+
|
11 |
+
def detect_encoding(data: bytes) -> str: ... # undocumented
|
12 |
+
def dumps(obj: Any, **kwargs: Any): ...
|
13 |
+
def dump(obj: Any, fp: Any, **kwargs: Any) -> None: ...
|
14 |
+
def loads(s: Any, **kwargs: Any): ...
|
15 |
+
def load(fp: Any, **kwargs: Any): ...
|
16 |
+
def htmlsafe_dumps(obj: Any, **kwargs: Any): ...
|
17 |
+
def htmlsafe_dump(obj: Any, fp: Any, **kwargs: Any) -> None: ...
|
18 |
+
def jsonify(*args: Any, **kwargs: Any): ...
|
19 |
+
def tojson_filter(obj: Any, **kwargs: Any) -> Markup: ... # undocumented
|