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

XML-строка, в которой содержится ключ алгоритма Диффи-Хеллмана на эллиптических кривых (ECDH).

Возвращаемое значение

Объект, в котором содержится открытый ключ ECDH, заданный указанной XML-строкой.

Атрибуты

Исключения

Параметр xml имеет значение null.

Для параметра xml не задан ключ ECDiffieHellman.

.NET Core и .NET 5+: во всех случаях.

Комментарии

Этот статический метод является общим для всех ECDiffieHellmanCngPublicKey экземпляров.

Применяется к