From c577c84a17657a4dd7c951c2a1336bb115f6d634 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Fri, 20 Jan 2017 15:40:30 +0000 Subject: [PATCH] Add stub for cryptography.hazmat.primitives.serialization (#851) This makes the stubs for cryptoraphy less incompelete. Created using stubgen. I don't know what the types are. --- .../hazmat/primitives/serialization.pyi | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 third_party/2/cryptography/hazmat/primitives/serialization.pyi diff --git a/third_party/2/cryptography/hazmat/primitives/serialization.pyi b/third_party/2/cryptography/hazmat/primitives/serialization.pyi new file mode 100644 index 000000000..57ff681bd --- /dev/null +++ b/third_party/2/cryptography/hazmat/primitives/serialization.pyi @@ -0,0 +1,32 @@ +# Stubs for cryptography.hazmat.primitives.serialization (Python 2) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from enum import Enum + +def load_pem_private_key(data, password, backend): ... +def load_pem_public_key(data, backend): ... +def load_der_private_key(data, password, backend): ... +def load_der_public_key(data, backend): ... +def load_ssh_public_key(data, backend): ... + +class Encoding(Enum): + PEM = ... # type: str + DER = ... # type: str + +class PrivateFormat(Enum): + PKCS8 = ... # type: str + TraditionalOpenSSL = ... # type: str + +class PublicFormat(Enum): + SubjectPublicKeyInfo = ... # type: str + PKCS1 = ... # type: str + +class KeySerializationEncryption: ... + +class BestAvailableEncryption: + password = ... # type: Any + def __init__(self, password) -> None: ... + +class NoEncryption: ...