ExportKeyToStream Method
Saves the private key to a stream.
Syntax
public void exportKeyToStream(java.io.OutputStream keyStream, String password, int format);
Remarks
Use this method to export the private key to a stream in one of the formats given below. Pass the encryption password via the Password parameter.
Supported certificate key format values:
| cfmUnknown | 0 | Unknown certificate format |
| cfmDER | 1 | DER file format. Applicable to certificates, certificate requests, private keys. Encryption not supported |
| cfmPEM | 2 | PEM file format. Applicable to certificates, certificate requests, private keys. Encryption supported for private keys. |
| cfmPFX | 3 | PFX/PKCS#12 file format. Applicable to certificates. Encryption supported. |
| cfmSPC | 4 | SPC file format. Applicable to certificates. Encryption not supported. |
| cfmPVK | 5 | PVK file format. Applicable to private keys. Encryption not supported. |
| cfmPKCS8 | 6 | PKCS#8 file format. Applicable to private keys. Encryption supported. |
| cfmNET | 7 | NET file format. Applicable to private keys. Encryption not supported. |