語言

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 核心與 .NET 5+:在所有情況下皆適用。

備註

請參閱 ECKeyXmlFormat.Rfc4050 有關此方法所使用的 XML 格式資訊。

適用於