public class VirgilStreamCipher extends VirgilCipherBase implements AutoCloseable
swigCMemOwn| Modifier | Constructor and Description |
|---|---|
|
VirgilStreamCipher()
Create a new instance of
VirgilStreamCipher |
protected |
VirgilStreamCipher(long cPtr,
boolean cMemoryOwn) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
decryptWithKey(VirgilDataSource source,
VirgilDataSink sink,
byte[] recipientId,
byte[] privateKey)
Decrypt data read from given source for recipient defined by id and
private key, and write it to the sink.
|
void |
decryptWithKey(VirgilDataSource source,
VirgilDataSink sink,
byte[] recipientId,
byte[] privateKey,
byte[] privateKeyPassword)
Decrypt data read from given source for recipient defined by id and
private key, and write it to the sink.
|
void |
decryptWithPassword(VirgilDataSource source,
VirgilDataSink sink,
byte[] pwd)
Decrypt data read from given source for recipient defined by password,
and write it to the sink.
|
void |
delete() |
void |
encrypt(VirgilDataSource source,
VirgilDataSink sink)
Encrypt data read from given source and write it the sink.
|
void |
encrypt(VirgilDataSource source,
VirgilDataSink sink,
boolean embedContentInfo)
Encrypt data read from given source and write it the sink.
|
protected void |
finalize() |
protected static long |
getCPtr(VirgilStreamCipher obj) |
addKeyRecipient, addPasswordRecipient, computeShared, computeShared, customParams, defineContentInfoSize, getContentInfo, getCPtr, keyRecipientExists, passwordRecipientExists, removeAllRecipients, removeKeyRecipient, removePasswordRecipient, setContentInfoprotected VirgilStreamCipher(long cPtr,
boolean cMemoryOwn)
public VirgilStreamCipher()
VirgilStreamCipherprotected static long getCPtr(VirgilStreamCipher obj)
protected void finalize()
finalize in class VirgilCipherBasepublic void delete()
delete in class VirgilCipherBasepublic void close()
close in interface AutoCloseableclose in class VirgilCipherBasepublic void encrypt(VirgilDataSource source, VirgilDataSink sink, boolean embedContentInfo)
Encrypt data read from given source and write it the sink.
Store content info to use it for decription process, if embedContentInfo parameter is false.
source - source of the data to be encrypted.sink - target sink for encrypted data.embedContentInfo - determines whether to embed content info the the encrypted
data, or not.public void encrypt(VirgilDataSource source, VirgilDataSink sink)
Encrypt data read from given source and write it the sink.
Store content info to use it for decription process, if embedContentInfo parameter is false.
source - source of the data to be encrypted.sink - target sink for encrypted data.public void decryptWithKey(VirgilDataSource source, VirgilDataSink sink, byte[] recipientId, byte[] privateKey, byte[] privateKeyPassword)
Decrypt data read from given source for recipient defined by id and private key, and write it to the sink.
Content info MUST be defined, if it was not embedded to the encrypted data.
source - source of the data to be decrypted.sink - target sink for decrypted data.recipientId - the recipient identifier.privateKey - the private key protected with password.privateKeyPassword - the private key password.public void decryptWithKey(VirgilDataSource source, VirgilDataSink sink, byte[] recipientId, byte[] privateKey)
Decrypt data read from given source for recipient defined by id and private key, and write it to the sink.
Content info MUST be defined, if it was not embedded to the encrypted data.
source - source of the data to be decrypted.sink - target sink for decrypted data.recipientId - the recipient identifier.privateKey - the private key.public void decryptWithPassword(VirgilDataSource source, VirgilDataSink sink, byte[] pwd)
Decrypt data read from given source for recipient defined by password, and write it to the sink.
Content info MUST be defined, if it was not embedded to the encrypted data.
source - source of the data to be decrypted.sink - target sink for decrypted data.pwd - the password.Copyright © 2016. All rights reserved.