Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


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.

C#
public override string ToXmlString(bool includePrivateParameters);

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

.NET Framework 4.8.1 és más verziók
Termék Verziók
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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.

C#
[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);
C#
public string ToXmlString(System.Security.Cryptography.ECKeyXmlFormat format);

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

.NET 10 és más verziók
Termék Verziók (Elavult)
.NET 6 (7, 8, 9, 10)
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5