Redigera

Dela via


ECDsaCng.ToXmlString Method

Definition

Serializes the key information to an XML string.

Overloads

ToXmlString(Boolean)

This method is not implemented.

ToXmlString(ECKeyXmlFormat)
Obsolete.

Serializes the key information to an XML string by using the specified format.

ToXmlString(Boolean)

This method is not implemented.

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

Parameters

includePrivateParameters
Boolean

true to include private parameters; otherwise, false.

Returns

Not applicable.

Exceptions

This method is not implemented.

Remarks

To convert the current key to an XML representation, use the ToXmlString(ECKeyXmlFormat) overload instead.

Applies to

ToXmlString(ECKeyXmlFormat)

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

Caution

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.

Serializes the key information to an XML string by using the specified format.

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

Parameters

format
ECKeyXmlFormat

One of the enumeration values that specifies the format of the XML string. The only currently accepted format is Rfc4050.

Returns

A string object that contains the key information, serialized to an XML string according to the requested format.

Attributes

Exceptions

format specifies an invalid format. The only accepted value is Rfc4050.

All other errors.

Applies to