public class EncryptionUtil
extends java.lang.Object
Constructor and Description |
---|
EncryptionUtil() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decrypt(byte[] key,
byte[] value)
Given a key, decrypts a byte array
|
static java.lang.String |
decryptString(byte[] key,
java.lang.String value)
Given a key, decrypts a String
|
static byte[] |
encrypt(byte[] key,
byte[] value)
Given a key, encrypts a byte array
|
static java.lang.String |
encryptString(byte[] key,
java.lang.String value)
Given a key, encrypts a String
|
public static java.lang.String encryptString(byte[] key, java.lang.String value)
key
- value
- public static java.lang.String decryptString(byte[] key, java.lang.String value)
key
- value
- public static byte[] encrypt(byte[] key, byte[] value)
key
- is converted to a byte array and copied to protect against subsequent modificationvalue
- is the byte array to be encryptedjava.lang.Exception
public static byte[] decrypt(byte[] key, byte[] value)
key
- is converted to a byte array and copied to protect against subsequent modificationvalue
- is the byte array to be decryptedjava.lang.Exception