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

import enum
import sys
import types
import typing
import uuid

import winsdk._winrt as _winrt

try:
    import winsdk.windows.foundation
except Exception:
    pass

try:
    import winsdk.windows.foundation.collections
except Exception:
    pass

try:
    import winsdk.windows.security.cryptography.certificates
except Exception:
    pass

try:
    import winsdk.windows.storage.streams
except Exception:
    pass

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

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: ...
    @typing.overload
    def create_key_pair(self, key_size: _winrt.UInt32) -> CryptographicKey: ...
    @typing.overload
    def create_key_pair_with_curve_name(self, curve_name: str) -> CryptographicKey: ...
    @typing.overload
    def create_key_pair_with_curve_parameters(self, parameters: typing.Sequence[_winrt.UInt8]) -> CryptographicKey: ...
    @typing.overload
    def import_key_pair(self, key_blob: winsdk.windows.storage.streams.IBuffer) -> CryptographicKey: ...
    @typing.overload
    def import_key_pair(self, key_blob: winsdk.windows.storage.streams.IBuffer, blob_type: CryptographicPrivateKeyBlobType) -> CryptographicKey: ...
    @typing.overload
    def import_public_key(self, key_blob: winsdk.windows.storage.streams.IBuffer) -> CryptographicKey: ...
    @typing.overload
    def import_public_key(self, key_blob: winsdk.windows.storage.streams.IBuffer, blob_type: CryptographicPublicKeyBlobType) -> CryptographicKey: ...
    @typing.overload
    @staticmethod
    def open_algorithm(algorithm: str) -> AsymmetricKeyAlgorithmProvider: ...

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

class CryptographicHash(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> CryptographicHash: ...
    @typing.overload
    def append(self, data: winsdk.windows.storage.streams.IBuffer) -> None: ...
    @typing.overload
    def get_value_and_reset(self) -> 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) -> winsdk.windows.storage.streams.IBuffer: ...
    @typing.overload
    def export(self, blob_type: CryptographicPrivateKeyBlobType) -> winsdk.windows.storage.streams.IBuffer: ...
    @typing.overload
    def export_public_key(self) -> winsdk.windows.storage.streams.IBuffer: ...
    @typing.overload
    def export_public_key(self, blob_type: CryptographicPublicKeyBlobType) -> winsdk.windows.storage.streams.IBuffer: ...

class EccCurveNames(_winrt.Object):
    all_ecc_curve_names: 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: winsdk.windows.storage.streams.IBuffer
    encrypted_data: 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: ...
    @typing.overload
    def create_hash(self) -> CryptographicHash: ...
    @typing.overload
    def hash_data(self, data: winsdk.windows.storage.streams.IBuffer) -> winsdk.windows.storage.streams.IBuffer: ...
    @typing.overload
    @staticmethod
    def open_algorithm(algorithm: str) -> 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: ...
    @typing.overload
    def create_key(self, key_material: winsdk.windows.storage.streams.IBuffer) -> CryptographicKey: ...
    @typing.overload
    @staticmethod
    def open_algorithm(algorithm: str) -> KeyDerivationAlgorithmProvider: ...

class KeyDerivationParameters(_winrt.Object):
    kdf_generic_binary: winsdk.windows.storage.streams.IBuffer
    iteration_count: _winrt.UInt32
    capi1_kdf_target_algorithm: Capi1KdfTargetAlgorithm
    @staticmethod
    def _from(obj: _winrt.Object) -> KeyDerivationParameters: ...
    @typing.overload
    @staticmethod
    def build_for_capi1_kdf(capi1_kdf_target_algorithm: Capi1KdfTargetAlgorithm) -> KeyDerivationParameters: ...
    @typing.overload
    @staticmethod
    def build_for_pbkdf2(pbkdf2_salt: winsdk.windows.storage.streams.IBuffer, iteration_count: _winrt.UInt32) -> KeyDerivationParameters: ...
    @typing.overload
    @staticmethod
    def build_for_s_p800108(label: winsdk.windows.storage.streams.IBuffer, context: winsdk.windows.storage.streams.IBuffer) -> KeyDerivationParameters: ...
    @typing.overload
    @staticmethod
    def build_for_s_p80056a(algorithm_id: winsdk.windows.storage.streams.IBuffer, party_u_info: winsdk.windows.storage.streams.IBuffer, party_v_info: winsdk.windows.storage.streams.IBuffer, supp_pub_info: winsdk.windows.storage.streams.IBuffer, supp_priv_info: winsdk.windows.storage.streams.IBuffer) -> 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: ...
    @typing.overload
    def create_hash(self, key_material: winsdk.windows.storage.streams.IBuffer) -> CryptographicHash: ...
    @typing.overload
    def create_key(self, key_material: winsdk.windows.storage.streams.IBuffer) -> CryptographicKey: ...
    @typing.overload
    @staticmethod
    def open_algorithm(algorithm: str) -> MacAlgorithmProvider: ...

class PersistedKeyProvider(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> PersistedKeyProvider: ...
    @typing.overload
    @staticmethod
    def open_key_pair_from_certificate_async(certificate: winsdk.windows.security.cryptography.certificates.Certificate, hash_algorithm_name: str, padding: CryptographicPadding) -> winsdk.windows.foundation.IAsyncOperation[CryptographicKey]: ...
    @typing.overload
    @staticmethod
    def open_public_key_from_certificate(certificate: winsdk.windows.security.cryptography.certificates.Certificate, hash_algorithm_name: str, padding: CryptographicPadding) -> 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: ...
    @typing.overload
    def create_symmetric_key(self, key_material: winsdk.windows.storage.streams.IBuffer) -> CryptographicKey: ...
    @typing.overload
    @staticmethod
    def open_algorithm(algorithm: str) -> SymmetricKeyAlgorithmProvider: ...

