Skip to main content

Windows Dev Center

AsymmetricKeyAlgorithmProvider.ImportPublicKey(IBuffer) | importPublicKey(IBuffer) method

Imports a public key into a buffer.

Syntax


var cryptographicKey = asymmetricKeyAlgorithmProvider.importPublicKey(keyBlob);

public CryptographicKey ImportPublicKey(
  IBuffer keyBlob
)

Public Function ImportPublicKey(
  keyBlob As IBuffer 
) As CryptographicKey

public:
CryptographicKey^ ImportPublicKey(
  IBuffer^ keyBlob
)

Parameters

keyBlob

Type: IBuffer

Buffer that contains the key to import.

Return value

Type: CryptographicKey

Represents the imported key.

Requirements (Windows 10 device family)

Device family

Universal

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

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
ImportPublicKey(IBuffer, CryptographicPublicKeyBlobType)