ECDiffieHellmanCng.ToXmlString 方法

定义

将密钥信息序列化为 XML 字符串。

重载

ToXmlString(Boolean)

未实现此方法。

ToXmlString(ECKeyXmlFormat)
已过时.

使用指定的格式将密钥信息序列化为 XML 字符串。

ToXmlString(Boolean)

未实现此方法。

public:
 override System::String ^ ToXmlString(bool includePrivateParameters);
public override string ToXmlString (bool includePrivateParameters);
override this.ToXmlString : bool -> string
Public Overrides Function ToXmlString (includePrivateParameters As Boolean) As String

参数

includePrivateParameters
Boolean

若要包含专用参数,则为 true;否则为 false

返回

不适用。

例外

未重写此实例的方法。

注解

若要将当前键转换为 XML 表示形式,请 ToXmlString(ECKeyXmlFormat) 改用 重载。

适用于

ToXmlString(ECKeyXmlFormat)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

注意

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 字符串。

public:
 System::String ^ ToXmlString(System::Security::Cryptography::ECKeyXmlFormat format);
public string ToXmlString (System.Security.Cryptography.ECKeyXmlFormat format);
[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 string ToXmlString (System.Security.Cryptography.ECKeyXmlFormat format);
override this.ToXmlString : System.Security.Cryptography.ECKeyXmlFormat -> 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 : System.Security.Cryptography.ECKeyXmlFormat -> string
Public Function ToXmlString (format As ECKeyXmlFormat) As String

参数

format
ECKeyXmlFormat

枚举值之一,它指定 XML 字符串的格式。 当前接受的唯一格式为 Rfc4050

返回

一个包含密钥信息的字符串对象,该密钥信息已根据请求的格式序列化为 XML 字符串。

属性

例外

format 指定的格式无效。 唯一接受的值为 Rfc4050

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

适用于