|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Objectorg.jasypt.util.binary.StrongBinaryEncryptor
public final class StrongBinaryEncryptor
Utility class for easily performing high-strength encryption of binaries (byte arrays).
This class internally holds a StandardPBEByteEncryptor
configured this way:
The required steps to use it are:
setPassword(String) or
setPasswordCharArray(char[])).encrypt(byte[]) or
decrypt(byte[]) operations.This class is thread-safe.
| Constructor Summary | |
|---|---|
StrongBinaryEncryptor()
Creates a new instance of StrongBinaryEncryptor. |
|
| Method Summary | |
|---|---|
byte[] |
decrypt(byte[] encryptedBinary)
Decrypts a byte array. |
byte[] |
encrypt(byte[] binary)
Encrypts a byte array |
void |
setPassword(String password)
Sets a password. |
void |
setPasswordCharArray(char[] password)
Sets a password, as a char[]. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StrongBinaryEncryptor()
| Method Detail |
|---|
public void setPassword(String password)
password - the password to be set.public void setPasswordCharArray(char[] password)
password - the password to be set.public byte[] encrypt(byte[] binary)
encrypt in interface BinaryEncryptorbinary - the byte array to be encrypted.StandardPBEByteEncryptor.encrypt(byte[])public byte[] decrypt(byte[] encryptedBinary)
decrypt in interface BinaryEncryptorencryptedBinary - the byte array to be decrypted.StandardPBEByteEncryptor.decrypt(byte[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||