ECDiffieHellmanCngPublicKey.FromByteArray(Byte[], CngKeyBlobFormat) 方法

定義

根據指定的格式,將包含公開金鑰的位元組陣列轉換成 ECDiffieHellmanCngPublicKey 物件。

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

參數

publicKeyBlob
Byte[]

包含 Elliptic Curve Diffie-Hellman (ECDH) 公開金鑰的位元組陣列。

format
CngKeyBlobFormat

指定金鑰 BLOB 格式的物件。

傳回

包含在位元組陣列中序列化的 ECDH 公開金鑰的物件。

屬性

例外狀況

publicKeyBlobformat 參數為 null

publicKeyBlob 參數未包含 ECDiffieHellman 金鑰。

備註

這個靜態方法會在所有 ECDiffieHellmanCngPublicKey 實例之間共用。

適用於