public class CompactEncryption
extends java.lang.Object
CompactBinarystreamEncryption
.
Constructor and Description |
---|
CompactEncryption(ISecretKey key) |
CompactEncryption(ISecretKey key,
java.lang.String encryptionAlgorithm) |
Modifier and Type | Method and Description |
---|---|
IData |
decryptFromBase64(java.lang.String base64) |
IData |
decryptFromBytes(byte[] encryptedData) |
IData |
decryptFromFile(java.io.File file) |
IData |
decryptFromFile(java.lang.String file) |
IData |
decryptFromHex(java.lang.String hex) |
IData |
decryptFromJsonObject(morg.json.JSONObject json) |
IData |
decryptFromJsonString(java.lang.String json) |
IData |
decryptFromStream(java.io.InputStream in) |
java.lang.String |
encryptToBase64(IData data) |
byte[] |
encryptToBytes(IData data) |
void |
encryptToFile(java.io.File file,
IData data) |
void |
encryptToFile(java.lang.String file,
IData data) |
java.lang.String |
encryptToHex(IData data) |
morg.json.JSONObject |
encryptToJsonObject(IData data) |
java.lang.String |
encryptToJsonString(IData data) |
void |
encryptToStream(java.io.OutputStream out,
IData data) |
java.lang.String |
getAlgorithm() |
byte[] |
getIVInBytes()
Is only valid after the usage of one of the encrypt/decrypt methods.
|
javax.crypto.Cipher |
getJCEDecryptCipher() |
javax.crypto.Cipher |
getJCEEncryptCipher() |
public CompactEncryption(ISecretKey key)
public CompactEncryption(ISecretKey key, java.lang.String encryptionAlgorithm)
public byte[] getIVInBytes()
public java.lang.String getAlgorithm()
public byte[] encryptToBytes(IData data)
public java.lang.String encryptToBase64(IData data)
public java.lang.String encryptToHex(IData data)
public java.lang.String encryptToJsonString(IData data)
public morg.json.JSONObject encryptToJsonObject(IData data)
public void encryptToStream(java.io.OutputStream out, IData data)
public void encryptToFile(java.lang.String file, IData data)
public void encryptToFile(java.io.File file, IData data)
public IData decryptFromBytes(byte[] encryptedData)
public IData decryptFromBase64(java.lang.String base64)
public IData decryptFromHex(java.lang.String hex)
public IData decryptFromJsonString(java.lang.String json)
public IData decryptFromJsonObject(morg.json.JSONObject json)
public IData decryptFromStream(java.io.InputStream in)
public IData decryptFromFile(java.lang.String file)
public IData decryptFromFile(java.io.File file)
public javax.crypto.Cipher getJCEEncryptCipher()
public javax.crypto.Cipher getJCEDecryptCipher()