Back to product page

PrivateKey property


Holds raw private key.

Type

A String value

Syntax

  • Basic
object.PrivateKey [= value]
The PrivateKey(object,value) syntax has these parts:
objectAn expression evaluating to an object of type Certificate.
valueA String value.

Remarks

PrivateKey property is used if you don't want to call internal LoadKey and SaveKey method to preserve key data between sessions. Once GenerateKey is called, you can retrieve key's raw data using this property, and store it somewhere depending on your needs. Obtaining private key data this way does not encrypt it in any way - you should do it by yourself when you store the key.

In later sessions, you can easily load your key internally, put it in this property, and you will immediately be able to use it.

Note that setting PrivateKey with unexpected data may result in component rejecting your key. It is advised to set PrivateKey only with data you have previously retrieved from the same property (in previous session).

Platforms

Windows