massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / cryptography / cryptography / hazmat / primitives / serialization / __init__.pyi
diff --git a/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stubs/cryptography/cryptography/hazmat/primitives/serialization/__init__.pyi b/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stubs/cryptography/cryptography/hazmat/primitives/serialization/__init__.pyi
new file mode 100644 (file)
index 0000000..e899766
--- /dev/null
@@ -0,0 +1,60 @@
+from abc import ABCMeta
+from enum import Enum
+from typing import Any
+
+from cryptography.hazmat.backends.interfaces import (
+    DERSerializationBackend,
+    DSABackend,
+    EllipticCurveBackend,
+    PEMSerializationBackend,
+    RSABackend,
+)
+
+def load_pem_private_key(
+    data: bytes, password: bytes | None, backend: PEMSerializationBackend | None = ...
+) -> Any: ...  # actually RSAPrivateKey | DSAPrivateKey | DHPrivateKey | EllipticCurvePrivateKey
+def load_pem_public_key(
+    data: bytes, backend: PEMSerializationBackend | None = ...
+) -> Any: ...  # actually RSAPublicKey | DSAPublicKey | DHPublicKey | EllipticCurvePublicKey
+def load_der_private_key(
+    data: bytes, password: bytes | None, backend: DERSerializationBackend | None = ...
+) -> Any: ...  # actually RSAPrivateKey | DSAPrivateKey | DHPrivateKey | EllipticCurvePrivateKey
+def load_der_public_key(
+    data: bytes, backend: DERSerializationBackend | None = ...
+) -> Any: ...  # actually RSAPublicKey | DSAPublicKey | DHPublicKey | EllipticCurvePublicKey
+def load_ssh_public_key(
+    data: bytes, backend: RSABackend | DSABackend | EllipticCurveBackend | None = ...
+) -> Any: ...  # actually RSAPublicKey | DSAPublicKey | DHPublicKey | EllipticCurvePublicKey | Ed25519PublicKey
+
+class Encoding(Enum):
+    PEM: str
+    DER: str
+    OpenSSH: str
+    Raw: str
+    X962: str
+    SMIME: str
+
+class PrivateFormat(Enum):
+    PKCS8: str
+    TraditionalOpenSSL: str
+    Raw: str
+    OpenSSH: str
+
+class PublicFormat(Enum):
+    SubjectPublicKeyInfo: str
+    PKCS1: str
+    OpenSSH: str
+    Raw: str
+    CompressedPoint: str
+    UncompressedPoint: str
+
+class ParameterFormat(Enum):
+    PKCS3: str
+
+class KeySerializationEncryption(metaclass=ABCMeta): ...
+
+class BestAvailableEncryption(KeySerializationEncryption):
+    password: bytes
+    def __init__(self, password: bytes) -> None: ...
+
+class NoEncryption(KeySerializationEncryption): ...