Back to product page

SaveKey method


Saves private key to file.

Type

None

Syntax

  • Basic
object.SaveKey Filename, [Password]
The SaveKey(object,Filename,Password) syntax has these parts:
objectAn expression evaluating to an object of type Certificate.
FilenameRequired. A String value. Full path for private key file.
PasswordOptional. A Variant value. Password to protect saved key.

Remarks

Save method will store contents of private key from memory to a file on your disk drive. Key is saved using PEM format, and is actually base64 encoded data surrounded by header lines, which makes it exportable (and importable) to other SSH (or SSL) engines. Optionally (and suggested) you can specify password to be used when key is written to disk, so only you can read saved key. Don't forget to use the same password when you load key from disk.

Written file contains only plain ASCII characters.

Platforms

Windows