public class StreamCipher extends CipherBase implements AutoCloseable
| Constructor and Description |
|---|
StreamCipher()
Create a new instance of
StreamCipher |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
decryptWithKey(InputStream inputStream,
OutputStream outputStream,
Recipient recipient,
PrivateKey privateKey)
Decrypt encrypted data from stream with key protected by password.
|
void |
decryptWithKey(InputStream inputStream,
OutputStream outputStream,
Recipient recipient,
PrivateKey privateKey,
Password privateKeyPassword)
Decrypt encrypted data from stream with key protected by password.
|
void |
decryptWithPassword(InputStream inputStream,
OutputStream outputStream,
Password password)
Decrypt encrypted data from stream with password.
|
void |
encrypt(InputStream inputStream,
OutputStream outputStream)
Encrypt stream data.
|
void |
encrypt(InputStream inputStream,
OutputStream outputStream,
boolean embedContentInfo)
Encrypt stream data.
|
addKeyRecipient, addKeyRecipient, addPasswordRecipient, addPasswordRecipient, customParams, defineContentInfoSize, getContentInfo, removeAllRecipients, removeKeyRecipient, removePasswordRecipient, setContentInfopublic void close()
throws Exception
close in interface AutoCloseableclose in class CipherBaseExceptionpublic void encrypt(InputStream inputStream, OutputStream outputStream, boolean embedContentInfo)
inputStream - the input stream to be encrypted.outputStream - encrypted data will be written to this stream.embedContentInfo - true if content information should be embedded into
data.public void encrypt(InputStream inputStream, OutputStream outputStream)
inputStream - the input stream to be encrypted.outputStream - encrypted data will be written to this stream.public void decryptWithKey(InputStream inputStream, OutputStream outputStream, Recipient recipient, PrivateKey privateKey, Password privateKeyPassword)
inputStream - the input stream to be decrypted.outputStream - decrypted data will be written to this stream.recipient - the recipient.privateKey - the private key used for data decryption.privateKeyPassword - the private key password.public void decryptWithKey(InputStream inputStream, OutputStream outputStream, Recipient recipient, PrivateKey privateKey)
inputStream - the input stream to be decrypted.outputStream - decrypted data will be written to this stream.recipient - the recipient.privateKey - the private key used for data decryption.public void decryptWithPassword(InputStream inputStream, OutputStream outputStream, Password password)
inputStream - the input stream to be decrypted.outputStream - decrypted data will be written to this stream.password - the password used for data decryption.Copyright © 2016. All rights reserved.