# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.7

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.security.cryptography.certificates
import winsdk.windows.storage.streams

class Capi1KdfTargetAlgorithm(enum.IntEnum):
    NOT_AES = 0
    AES = 1

class CryptographicPadding(enum.IntEnum):
    NONE = 0
    RSA_OAEP = 1
    RSA_PKCS1_V15 = 2
    RSA_PSS = 3

class CryptographicPrivateKeyBlobType(enum.IntEnum):
    PKCS8_RAW_PRIVATE_KEY_INFO = 0
    PKCS1_RSA_PRIVATE_KEY = 1
    B_CRYPT_PRIVATE_KEY = 2
    CAPI1_PRIVATE_KEY = 3
    B_CRYPT_ECC_FULL_PRIVATE_KEY = 4

class CryptographicPublicKeyBlobType(enum.IntEnum):
    X509_SUBJECT_PUBLIC_KEY_INFO = 0
    PKCS1_RSA_PUBLIC_KEY = 1
    B_CRYPT_PUBLIC_KEY = 2
    CAPI1_PUBLIC_KEY = 3
    B_CRYPT_ECC_FULL_PUBLIC_KEY = 4

Self = typing.TypeVar('Self')

class AsymmetricAlgorithmNames(_winrt.Object):
    ecdsa_p521_sha512: str
    dsa_sha1: str
    dsa_sha256: str
    ecdsa_p256_sha256: str
    ecdsa_p384_sha384: str
    rsa_sign_pkcs1_sha256: str
    rsa_oaep_sha1: str
    rsa_oaep_sha256: str
    rsa_oaep_sha384: str
    rsa_oaep_sha512: str
    rsa_pkcs1: str
    rsa_sign_pkcs1_sha1: str
    rsa_sign_pkcs1_sha384: str
    rsa_sign_pkcs1_sha512: str
    rsa_sign_pss_sha1: str
    rsa_sign_pss_sha256: str
    rsa_sign_pss_sha384: str
    rsa_sign_pss_sha512: str
    ecdsa_sha384: str
    ecdsa_sha512: str
    ecdsa_sha256: str
    @staticmethod
    def _from(obj: _winrt.Object) -> AsymmetricAlgorithmNames: ...

class AsymmetricKeyAlgorithmProvider(_winrt.Object):
    algorithm_name: str
    @staticmethod
    def _from(obj: _winrt.Object) -> AsymmetricKeyAlgorithmProvider: ...
    def create_key_pair(self, key_size: _winrt.UInt32) -> typing.Optional[CryptographicKey]: ...
    def create_key_pair_with_curve_name(self, curve_name: str) -> typing.Optional[CryptographicKey]: ...
    def create_key_pair_with_curve_parameters(self, parameters: typing.Sequence[_winrt.UInt8]) -> typing.Optional[CryptographicKey]: ...
    @typing.overload
    def import_key_pair(self, key_blob: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[CryptographicKey]: ...
    @typing.overload
    def import_key_pair(self, key_blob: typing.Optional[winsdk.windows.storage.streams.IBuffer], blob_type: CryptographicPrivateKeyBlobType) -> typing.Optional[CryptographicKey]: ...
    @typing.overload
    def import_public_key(self, key_blob: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[CryptographicKey]: ...
    @typing.overload
    def import_public_key(self, key_blob: typing.Optional[winsdk.windows.storage.streams.IBuffer], blob_type: CryptographicPublicKeyBlobType) -> typing.Optional[CryptographicKey]: ...
    @staticmethod
    def open_algorithm(algorithm: str) -> typing.Optional[AsymmetricKeyAlgorithmProvider]: ...

class CryptographicEngine(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> CryptographicEngine: ...
    @staticmethod
    def decrypt(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer], iv: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def decrypt_and_authenticate(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer], nonce: typing.Optional[winsdk.windows.storage.streams.IBuffer], authentication_tag: typing.Optional[winsdk.windows.storage.streams.IBuffer], authenticated_data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def decrypt_async(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer], iv: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def derive_key_material(key: typing.Optional[CryptographicKey], parameters: typing.Optional[KeyDerivationParameters], desired_key_size: _winrt.UInt32) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def encrypt(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer], iv: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def encrypt_and_authenticate(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer], nonce: typing.Optional[winsdk.windows.storage.streams.IBuffer], authenticated_data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[EncryptedAndAuthenticatedData]: ...
    @staticmethod
    def sign(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def sign_async(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def sign_hashed_data(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def sign_hashed_data_async(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> winsdk.windows.foundation.IAsyncOperation[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def verify_signature(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer], signature: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> _winrt.Boolean: ...
    @staticmethod
    def verify_signature_with_hash_input(key: typing.Optional[CryptographicKey], data: typing.Optional[winsdk.windows.storage.streams.IBuffer], signature: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> _winrt.Boolean: ...

class CryptographicHash(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> CryptographicHash: ...
    def append(self, data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> None: ...
    def get_value_and_reset(self) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...

class CryptographicKey(_winrt.Object):
    key_size: _winrt.UInt32
    @staticmethod
    def _from(obj: _winrt.Object) -> CryptographicKey: ...
    @typing.overload
    def export(self) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @typing.overload
    def export(self, blob_type: CryptographicPrivateKeyBlobType) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @typing.overload
    def export_public_key(self) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @typing.overload
    def export_public_key(self, blob_type: CryptographicPublicKeyBlobType) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...

class EccCurveNames(_winrt.Object):
    all_ecc_curve_names: typing.Optional[winsdk.windows.foundation.collections.IVectorView[str]]
    brainpool_p160r1: str
    brainpool_p160t1: str
    brainpool_p192r1: str
    brainpool_p192t1: str
    brainpool_p224r1: str
    brainpool_p224t1: str
    brainpool_p256r1: str
    brainpool_p256t1: str
    brainpool_p320r1: str
    brainpool_p320t1: str
    brainpool_p384r1: str
    brainpool_p384t1: str
    brainpool_p512r1: str
    brainpool_p512t1: str
    curve25519: str
    ec192wapi: str
    nist_p192: str
    nist_p224: str
    nist_p256: str
    nist_p384: str
    nist_p521: str
    nums_p256t1: str
    nums_p384t1: str
    nums_p512t1: str
    sec_p160k1: str
    sec_p160r1: str
    sec_p160r2: str
    sec_p192k1: str
    sec_p192r1: str
    sec_p224k1: str
    sec_p224r1: str
    sec_p256k1: str
    sec_p256r1: str
    sec_p384r1: str
    sec_p521r1: str
    wtls12: str
    wtls7: str
    wtls9: str
    x962_p192v1: str
    x962_p192v2: str
    x962_p192v3: str
    x962_p239v1: str
    x962_p239v2: str
    x962_p239v3: str
    x962_p256v1: str
    @staticmethod
    def _from(obj: _winrt.Object) -> EccCurveNames: ...

class EncryptedAndAuthenticatedData(_winrt.Object):
    authentication_tag: typing.Optional[winsdk.windows.storage.streams.IBuffer]
    encrypted_data: typing.Optional[winsdk.windows.storage.streams.IBuffer]
    @staticmethod
    def _from(obj: _winrt.Object) -> EncryptedAndAuthenticatedData: ...

class HashAlgorithmNames(_winrt.Object):
    md5: str
    sha1: str
    sha256: str
    sha384: str
    sha512: str
    @staticmethod
    def _from(obj: _winrt.Object) -> HashAlgorithmNames: ...

class HashAlgorithmProvider(_winrt.Object):
    algorithm_name: str
    hash_length: _winrt.UInt32
    @staticmethod
    def _from(obj: _winrt.Object) -> HashAlgorithmProvider: ...
    def create_hash(self) -> typing.Optional[CryptographicHash]: ...
    def hash_data(self, data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[winsdk.windows.storage.streams.IBuffer]: ...
    @staticmethod
    def open_algorithm(algorithm: str) -> typing.Optional[HashAlgorithmProvider]: ...

class KeyDerivationAlgorithmNames(_winrt.Object):
    pbkdf2_sha256: str
    pbkdf2_md5: str
    pbkdf2_sha1: str
    sp800108_ctr_hmac_sha512: str
    pbkdf2_sha384: str
    pbkdf2_sha512: str
    sp800108_ctr_hmac_md5: str
    sp800108_ctr_hmac_sha1: str
    sp800108_ctr_hmac_sha256: str
    sp800108_ctr_hmac_sha384: str
    sp80056a_concat_md5: str
    sp80056a_concat_sha1: str
    sp80056a_concat_sha256: str
    sp80056a_concat_sha384: str
    sp80056a_concat_sha512: str
    capi_kdf_sha1: str
    capi_kdf_sha256: str
    capi_kdf_sha384: str
    capi_kdf_sha512: str
    capi_kdf_md5: str
    @staticmethod
    def _from(obj: _winrt.Object) -> KeyDerivationAlgorithmNames: ...

class KeyDerivationAlgorithmProvider(_winrt.Object):
    algorithm_name: str
    @staticmethod
    def _from(obj: _winrt.Object) -> KeyDerivationAlgorithmProvider: ...
    def create_key(self, key_material: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[CryptographicKey]: ...
    @staticmethod
    def open_algorithm(algorithm: str) -> typing.Optional[KeyDerivationAlgorithmProvider]: ...

class KeyDerivationParameters(_winrt.Object):
    kdf_generic_binary: typing.Optional[winsdk.windows.storage.streams.IBuffer]
    iteration_count: _winrt.UInt32
    capi1_kdf_target_algorithm: Capi1KdfTargetAlgorithm
    @staticmethod
    def _from(obj: _winrt.Object) -> KeyDerivationParameters: ...
    @staticmethod
    def build_for_capi1_kdf(capi1_kdf_target_algorithm: Capi1KdfTargetAlgorithm) -> typing.Optional[KeyDerivationParameters]: ...
    @staticmethod
    def build_for_pbkdf2(pbkdf2_salt: typing.Optional[winsdk.windows.storage.streams.IBuffer], iteration_count: _winrt.UInt32) -> typing.Optional[KeyDerivationParameters]: ...
    @staticmethod
    def build_for_s_p800108(label: typing.Optional[winsdk.windows.storage.streams.IBuffer], context: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[KeyDerivationParameters]: ...
    @staticmethod
    def build_for_s_p80056a(algorithm_id: typing.Optional[winsdk.windows.storage.streams.IBuffer], party_u_info: typing.Optional[winsdk.windows.storage.streams.IBuffer], party_v_info: typing.Optional[winsdk.windows.storage.streams.IBuffer], supp_pub_info: typing.Optional[winsdk.windows.storage.streams.IBuffer], supp_priv_info: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[KeyDerivationParameters]: ...

class MacAlgorithmNames(_winrt.Object):
    aes_cmac: str
    hmac_md5: str
    hmac_sha1: str
    hmac_sha256: str
    hmac_sha384: str
    hmac_sha512: str
    @staticmethod
    def _from(obj: _winrt.Object) -> MacAlgorithmNames: ...

class MacAlgorithmProvider(_winrt.Object):
    algorithm_name: str
    mac_length: _winrt.UInt32
    @staticmethod
    def _from(obj: _winrt.Object) -> MacAlgorithmProvider: ...
    def create_hash(self, key_material: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[CryptographicHash]: ...
    def create_key(self, key_material: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[CryptographicKey]: ...
    @staticmethod
    def open_algorithm(algorithm: str) -> typing.Optional[MacAlgorithmProvider]: ...

class PersistedKeyProvider(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> PersistedKeyProvider: ...
    @staticmethod
    def open_key_pair_from_certificate_async(certificate: typing.Optional[winsdk.windows.security.cryptography.certificates.Certificate], hash_algorithm_name: str, padding: CryptographicPadding) -> winsdk.windows.foundation.IAsyncOperation[CryptographicKey]: ...
    @staticmethod
    def open_public_key_from_certificate(certificate: typing.Optional[winsdk.windows.security.cryptography.certificates.Certificate], hash_algorithm_name: str, padding: CryptographicPadding) -> typing.Optional[CryptographicKey]: ...

class SymmetricAlgorithmNames(_winrt.Object):
    aes_cbc: str
    aes_cbc_pkcs7: str
    aes_ccm: str
    aes_ecb: str
    aes_ecb_pkcs7: str
    aes_gcm: str
    des_cbc: str
    des_cbc_pkcs7: str
    des_ecb: str
    des_ecb_pkcs7: str
    rc2_cbc: str
    rc2_cbc_pkcs7: str
    rc2_ecb: str
    rc2_ecb_pkcs7: str
    rc4: str
    triple_des_cbc: str
    triple_des_cbc_pkcs7: str
    triple_des_ecb: str
    triple_des_ecb_pkcs7: str
    @staticmethod
    def _from(obj: _winrt.Object) -> SymmetricAlgorithmNames: ...

class SymmetricKeyAlgorithmProvider(_winrt.Object):
    algorithm_name: str
    block_length: _winrt.UInt32
    @staticmethod
    def _from(obj: _winrt.Object) -> SymmetricKeyAlgorithmProvider: ...
    def create_symmetric_key(self, key_material: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> typing.Optional[CryptographicKey]: ...
    @staticmethod
    def open_algorithm(algorithm: str) -> typing.Optional[SymmetricKeyAlgorithmProvider]: ...

