Share via


ECDiffieHellmanCngPublicKey.FromXmlString(String) 方法

定義

警告

ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.

將 XML 字串轉換成 ECDiffieHellmanCngPublicKey 物件。

public:
 static System::Security::Cryptography::ECDiffieHellmanCngPublicKey ^ FromXmlString(System::String ^ xml);
public static System.Security.Cryptography.ECDiffieHellmanCngPublicKey FromXmlString (string xml);
[System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.ECDiffieHellmanCngPublicKey FromXmlString (string xml);
[System.Security.SecurityCritical]
public static System.Security.Cryptography.ECDiffieHellmanCngPublicKey FromXmlString (string xml);
static member FromXmlString : string -> System.Security.Cryptography.ECDiffieHellmanCngPublicKey
[<System.Obsolete("ToXmlString and FromXmlString have no implementation for ECC types, and are obsolete. Use a standard import and export format such as ExportSubjectPublicKeyInfo or ImportSubjectPublicKeyInfo for public keys and ExportPkcs8PrivateKey or ImportPkcs8PrivateKey for private keys.", DiagnosticId="SYSLIB0042", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member FromXmlString : string -> System.Security.Cryptography.ECDiffieHellmanCngPublicKey
[<System.Security.SecurityCritical>]
static member FromXmlString : string -> System.Security.Cryptography.ECDiffieHellmanCngPublicKey
Public Shared Function FromXmlString (xml As String) As ECDiffieHellmanCngPublicKey

參數

xml
String

包含 Elliptic Curve Diffie-Hellman (ECDH) 金鑰的 XML 字串。

傳回

包含由提供的 XML 所指定 ECDH 公開金鑰的物件。

屬性

例外狀況

xml 參數為 null

xml 參數未指定 ECDiffieHellman 金鑰。

.NET Core 和 .NET 5+:在所有情況下。

備註

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

適用於