public class VirgilCipher extends VirgilCipherBase implements AutoCloseable
swigCMemOwn| Modifier | Constructor and Description |
|---|---|
|
VirgilCipher()
Create a new instance of
VirgilCipher |
protected |
VirgilCipher(long cPtr,
boolean cMemoryOwn) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
byte[] |
decryptWithKey(byte[] encryptedData,
byte[] recipientId,
byte[] privateKey)
Decrypt given data for recipient defined by id and private key.
|
byte[] |
decryptWithKey(byte[] encryptedData,
byte[] recipientId,
byte[] privateKey,
byte[] privateKeyPassword)
Decrypt given data for recipient defined by id and private key.
|
byte[] |
decryptWithPassword(byte[] encryptedData,
byte[] pwd)
Decrypt given data for recipient defined by password.
|
void |
delete() |
byte[] |
encrypt(byte[] data)
Encrypt given data.
|
byte[] |
encrypt(byte[] data,
boolean embedContentInfo)
Encrypt given data.
|
protected void |
finalize() |
protected static long |
getCPtr(VirgilCipher obj) |
addKeyRecipient, addPasswordRecipient, computeShared, computeShared, customParams, defineContentInfoSize, getContentInfo, getCPtr, keyRecipientExists, passwordRecipientExists, removeAllRecipients, removeKeyRecipient, removePasswordRecipient, setContentInfoprotected VirgilCipher(long cPtr,
boolean cMemoryOwn)
public VirgilCipher()
VirgilCipherprotected static long getCPtr(VirgilCipher obj)
protected void finalize()
finalize in class VirgilCipherBasepublic void delete()
delete in class VirgilCipherBasepublic void close()
close in interface AutoCloseableclose in class VirgilCipherBasepublic byte[] encrypt(byte[] data,
boolean embedContentInfo)
data - Data to be encrypted.embedContentInfo - Determines whether to embed content info the the encrypted
data, or not.public byte[] encrypt(byte[] data)
data - Data to be encrypted.public byte[] decryptWithKey(byte[] encryptedData,
byte[] recipientId,
byte[] privateKey,
byte[] privateKeyPassword)
encryptedData - Data to be decrypted.recipientId - The recipient identifier.privateKey - Recipient's private key protected with password.privateKeyPassword - The private key password.public byte[] decryptWithKey(byte[] encryptedData,
byte[] recipientId,
byte[] privateKey)
encryptedData - Data to be decrypted.recipientId - The recipient identifier.privateKey - Recipient's private key.public byte[] decryptWithPassword(byte[] encryptedData,
byte[] pwd)
encryptedData - Data to be decrypted.pwd - The password.Copyright © 2016. All rights reserved.