Share via


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

返回

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

属性

例外

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

注解

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

适用于