AsymmetricKeyAlgorithmProvider.ImportKeyPair(IBuffer, CryptographicPrivateKeyBlobType) | importKeyPair(IBuffer, CryptographicPrivateKeyBlobType) method

Applies to Windows and Windows Phone

Imports a public/private key pair from a buffer in the specified format.

Syntax


var cryptographicKey = asymmetricKeyAlgorithmProvider.importKeyPair(keyBlob, BlobType);

Parameters

keyBlob

Type: IBuffer

Buffer that contains the key pair to import.

BlobType

Type: CryptographicPrivateKeyBlobType

A CryptographicPrivateKeyBlobType enumeration value that specifies information about the private key contained in the keyBlob buffer. The default value is Pkcs8RawPrivateKeyInfo.

Return value

Type: CryptographicKey

Represents the imported key pair.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

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

AsymmetricKeyAlgorithmProvider
ImportKeyPair(IBuffer)

 

 

Show:
© 2014 Microsoft