语言

ECDiffieHellmanCngPublicKey.ToXmlString 方法

定义

注意

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.

将 ECDiffieHellmanCngPublicKey 公钥序列化为 RFC 4050 格式的 XML 字符串。

public:
 override System::String ^ ToXmlString();
[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 override string ToXmlString();
public override string ToXmlString();
[<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}")>]
override this.ToXmlString : unit -> string
override this.ToXmlString : unit -> string
Public Overrides Function ToXmlString () As String

返回

包含序列化 ECDiffieHellmanCngPublicKey 公钥的 XML 字符串。

特性

例外

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

注解

有关此方法使用的 XML 格式的信息,请参阅 ECKeyXmlFormat.Rfc4050 。

适用于