Certificate.SavePrivateKey Method
Namespace: Rebex.Security.Certificates
Assembly: Rebex.Common.dll (version 7.0.9119)
SavePrivateKey(String, String, PrivateKeyFormat, Boolean)
Saves the certificate's private key to the supplied file.
Declaration
public void SavePrivateKey(string fileName, string password, PrivateKeyFormat format, bool silent)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Path to the file to save the certificate to. If the file exists, it is overwritten. |
String | password | Private key password. |
PrivateKeyFormat | format | Private key file format. |
Boolean | silent | If set to true, the cryptographic provider should not display any user interface (UI) when exporting private key parameters. |
SavePrivateKey(Stream, String, PrivateKeyFormat, Boolean)
Saves the certificate's private key to the supplied stream.
Declaration
public void SavePrivateKey(Stream stream, string password, PrivateKeyFormat format, bool silent)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Stream to save the private key to. |
String | password | Private key password. |
PrivateKeyFormat | format | Private key file format. |
Boolean | silent | If set to true, the cryptographic provider should not display any user interface (UI) when exporting private key parameters. |