1 from abc import ABCMeta
5 from cryptography.hazmat.backends.interfaces import (
6 DERSerializationBackend,
9 PEMSerializationBackend,
13 def load_pem_private_key(
14 data: bytes, password: bytes | None, backend: PEMSerializationBackend | None = ...
15 ) -> Any: ... # actually RSAPrivateKey | DSAPrivateKey | DHPrivateKey | EllipticCurvePrivateKey
16 def load_pem_public_key(
17 data: bytes, backend: PEMSerializationBackend | None = ...
18 ) -> Any: ... # actually RSAPublicKey | DSAPublicKey | DHPublicKey | EllipticCurvePublicKey
19 def load_der_private_key(
20 data: bytes, password: bytes | None, backend: DERSerializationBackend | None = ...
21 ) -> Any: ... # actually RSAPrivateKey | DSAPrivateKey | DHPrivateKey | EllipticCurvePrivateKey
22 def load_der_public_key(
23 data: bytes, backend: DERSerializationBackend | None = ...
24 ) -> Any: ... # actually RSAPublicKey | DSAPublicKey | DHPublicKey | EllipticCurvePublicKey
25 def load_ssh_public_key(
26 data: bytes, backend: RSABackend | DSABackend | EllipticCurveBackend | None = ...
27 ) -> Any: ... # actually RSAPublicKey | DSAPublicKey | DHPublicKey | EllipticCurvePublicKey | Ed25519PublicKey
37 class PrivateFormat(Enum):
39 TraditionalOpenSSL: str
43 class PublicFormat(Enum):
44 SubjectPublicKeyInfo: str
49 UncompressedPoint: str
51 class ParameterFormat(Enum):
54 class KeySerializationEncryption(metaclass=ABCMeta): ...
56 class BestAvailableEncryption(KeySerializationEncryption):
58 def __init__(self, password: bytes) -> None: ...
60 class NoEncryption(KeySerializationEncryption): ...