Skip to main content
PersistedKeyProvider.OpenKeyPairFromCertificateAsync | openKeyPairFromCertificateAsync method

Opens the persisted private key from the specified Certificate object.

Syntax


Windows.Security.Cryptography.Core.PersistedKeyProvider.openKeyPairFromCertificateAsync(certificate, hashAlgorithmName, padding).done( /* Your success and error handlers */ );

public static IAsyncOperation<CryptographicKey> OpenKeyPairFromCertificateAsync(
  Certificate certificate, 
  string hashAlgorithmName, 
  CryptographicPadding padding
)

Public Shared Function OpenKeyPairFromCertificateAsync(
  certificate As Certificate,  
  hashAlgorithmName As String,  
  padding As CryptographicPadding 
) As IAsyncOperation(Of CryptographicKey)

public:
static IAsyncOperation<CryptographicKey>^ OpenKeyPairFromCertificateAsync(
  Certificate^ certificate, 
  String^ hashAlgorithmName, 
  CryptographicPadding padding
)

Parameters

certificate

Type: Certificate

The certificate that is associated with the private key.

hashAlgorithmName

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The hash algorithm for signature operations. For encryption, the hash algorithm is ignored.

padding

Type: CryptographicPadding

The padding mode for asymmetric algorithm signature or encryption operations.

Return value

Type: IAsyncOperation<CryptographicKey>

An asynchronous operation for retrieving a private key from the supplied Certificate object.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Security.Cryptography.Core
Windows::Security::Cryptography::Core [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Security.Cryptography.Core
Windows::Security::Cryptography::Core [C++]

Metadata

Windows.winmd

See also

CryptographicKey
PersistedKeyProvider