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[]

一个包含椭圆曲线 Diffie-Hellman (ECDH) 公钥的字节数组。

format
CngKeyBlobFormat

一个指定密钥 BLOB 格式的对象。

返回

一个包含 ECDH 公钥的对象,ECDH 公钥在字节数组中被序列化。

属性

例外

publicKeyBlobformat 参数为 null

publicKeyBlob 参数未包含 ECDiffieHellman 密钥。

注解

此静态方法在所有 ECDiffieHellmanCngPublicKey 实例之间共享。

适用于