public class Encryption
extends java.lang.Object
| Constructor and Description |
|---|
Encryption() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decrypt(java.lang.String key,
byte[] input,
int offset,
int length)
Decrypt the given data.
|
static byte[][] |
encrypt(java.lang.String key,
byte[] input,
int offset,
int length)
Encrypt the given data.
|
static int |
getIVLength() |
public static int getIVLength()
encrypt(String, byte[], int, int).public static byte[][] encrypt(java.lang.String key,
byte[] input,
int offset,
int length)
throws java.lang.Exception
key - A user-supplied password/key.input - The data to encrypt.offset - The offset into the data to encrypt.length - The length of the data to encrypt, from offset.java.lang.Exception - Encryption errorpublic static byte[] decrypt(java.lang.String key,
byte[] input,
int offset,
int length)
throws java.lang.Exception
key - A user-supplied password/key.input - The data to decrypt, prefixed with the initialisation vector (IV).offset - The offset into the data to decrypt (starting at IV).length - The length of the data to encrypt, from offset (NOT including length of IV).java.lang.Exception - Encryption error