PrivateKeyInfo.Save Method
Namespace: Rebex.Security.Cryptography.Pkcs
Assembly: Rebex.Common.dll (version 8.0.9673)
Save(Stream, String, PrivateKeyFormat)
Saves the private key into the supplied stream in the specified format.
Declaration
public void Save(Stream output, string password, PrivateKeyFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | output | A stream to which to save the private key. |
| String | password | Password to encrypt the private key, or null if no encryption desired. |
| PrivateKeyFormat | format | Private key file format. |
Save(Stream, Byte[], PrivateKeyFormat)
Saves the private key into the supplied stream in the specified format.
Declaration
protected void Save(Stream output, byte[] password, PrivateKeyFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | output | A stream to which to save the private key. |
| Byte[] | password | Password to encrypt the private key, or null if no encryption desired. |
| PrivateKeyFormat | format | Private key file format. |
Save(String, String, PrivateKeyFormat)
Saves the private key into the supplied stream in the specified format.
Declaration
public void Save(string fileName, string password, PrivateKeyFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| String | fileName | A file to which to save the public key. |
| String | password | Password to encrypt the private key, or null if no encryption desired. |
| PrivateKeyFormat | format | Private key file format. |