Editare

Partajați prin


ECDiffieHellmanCngPublicKey.FromByteArray(Byte[], CngKeyBlobFormat) Method

Definition

Converts a byte array that contains a public key to a ECDiffieHellmanCngPublicKey object according to the specified format.

public:
 static System::Security::Cryptography::ECDiffieHellmanPublicKey ^ FromByteArray(cli::array <System::Byte> ^ publicKeyBlob, System::Security::Cryptography::CngKeyBlobFormat ^ format);
public static System.Security.Cryptography.ECDiffieHellmanPublicKey FromByteArray (byte[] publicKeyBlob, System.Security.Cryptography.CngKeyBlobFormat format);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static System.Security.Cryptography.ECDiffieHellmanPublicKey FromByteArray (byte[] publicKeyBlob, System.Security.Cryptography.CngKeyBlobFormat format);
[System.Security.SecurityCritical]
public static System.Security.Cryptography.ECDiffieHellmanPublicKey FromByteArray (byte[] publicKeyBlob, System.Security.Cryptography.CngKeyBlobFormat format);
static member FromByteArray : byte[] * System.Security.Cryptography.CngKeyBlobFormat -> System.Security.Cryptography.ECDiffieHellmanPublicKey
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member FromByteArray : byte[] * System.Security.Cryptography.CngKeyBlobFormat -> System.Security.Cryptography.ECDiffieHellmanPublicKey
[<System.Security.SecurityCritical>]
static member FromByteArray : byte[] * System.Security.Cryptography.CngKeyBlobFormat -> System.Security.Cryptography.ECDiffieHellmanPublicKey
Public Shared Function FromByteArray (publicKeyBlob As Byte(), format As CngKeyBlobFormat) As ECDiffieHellmanPublicKey

Parameters

publicKeyBlob
Byte[]

A byte array that contains an Elliptic Curve Diffie-Hellman (ECDH) public key.

format
CngKeyBlobFormat

An object that specifies the format of the key BLOB.

Returns

An object that contains the ECDH public key that is serialized in the byte array.

Attributes

Exceptions

The publicKeyBlob or format parameter is null.

The publicKeyBlob parameter does not contain an ECDiffieHellman key.

Remarks

This static method is shared among all ECDiffieHellmanCngPublicKey instances.

Applies to