Back to product page

ToXmlString method


Creates and returns an XML string representation of the current RSA/DSA key.

Type

None

Syntax

  • Basic
object.ToXmlString(KeyType, IncludePrivate)
The ToXmlString(object,KeyType,IncludePrivate) syntax has these parts:
objectAn expression evaluating to an object of type Keys.
KeyTypeRequired. A SSHKeyTypes enumeration, as described in settings. Type of the key (RSA/DSA).
IncludePrivateRequired. A Boolean value that determine if private key is also exported. If set to False then only public part is exported.

Remarks

This method will return XML string expression of the key, so it can be reused by MS NET framework directly, or exported/imported again.

Platforms

Cross platform