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 オブジェクトに変換します。

C#
public static System.Security.Cryptography.ECDiffieHellmanCngPublicKey FromXmlString(string xml);
C#
[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);
C#
[System.Security.SecurityCritical]
public static System.Security.Cryptography.ECDiffieHellmanCngPublicKey FromXmlString(string xml);

パラメーター

xml
String

ECDH キーを格納した XML 文字列。

戻り値

指定した XML により指定される ECDH 公開キーを格納したオブジェクト。

属性

例外

xml パラメーターが null です。

xml パラメーターに ECDiffieHellman キーが指定されていません。

.NET Core と .NET 5 以降: すべての場合。

注釈

この静的メソッドは、すべての ECDiffieHellmanCngPublicKey インスタンス間で共有されます。

適用対象

製品 バージョン (廃止)
.NET 6 (7, 8, 9)
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5