Editar

ECDiffieHellmanCng.ToXmlString(ECKeyXmlFormat) Method

Definition

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);
[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);
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}")>]
override this.ToXmlString : System.Security.Cryptography.ECKeyXmlFormat -> string
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.

.NET Core and .NET 5+: In all cases.

Applies to