PrivateKeyEncryptionContext to use with this KeyPairResourceWriter.
KeyPairResourceWriter can serialize keys to an external representation.
| Modifier and Type | Method and Description |
|---|---|
| public void | writePrivateKey(KeyPair
to write the private key of key, String to write with the private key comment, OPTIONS for writing the key; may be options, OutputStream null if no encryption is wanted. The caller
is responsible for clearing the options when no longer needed. If the passphrase
obtained from the context is null or an empty/blank string (length zero
or containing only whitespace), the key is written unencrypted.The out)OutputStream to write to - recommend using a
SecureByteArrayOutputStream in order to reduce sensitive data exposure
in memoryWrites a serialization of a private key from a given |
| public default void | writePublicKey(KeyPair
to write the public key of key, String to write with the public key comment, OutputStream The out)OutputStream to write to - recommend using a
SecureByteArrayOutputStream in order to reduce sensitive data exposure
in memoryWrites a serialization of a public key from a given |
| public void | writePublicKey(PublicKey
to write key, String to write with the key comment, OutputStream The out)OutputStream to write to - recommend using a
SecureByteArrayOutputStream in order to reduce sensitive data exposure
in memoryWrites a serialization of a |
| writePrivateKey | back to summary |
|---|---|
| public void writePrivateKey(KeyPair key, String comment, OPTIONS options, OutputStream out) throws IOException, GeneralSecurityException Writes a serialization of a private key from a given
| |
| writePublicKey | back to summary |
|---|---|
| public default void writePublicKey(KeyPair key, String comment, OutputStream out) throws IOException, GeneralSecurityException Writes a serialization of a public key from a given
| |
| writePublicKey | back to summary |
|---|---|
| public void writePublicKey(PublicKey key, String comment, OutputStream out) throws IOException, GeneralSecurityException Writes a serialization of a
| |