Share via


ECDsaCng.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)

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
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

所有其他錯誤。

適用於