public class AES
extends java.lang.Object
Constructor and Description |
---|
AES(java.lang.String skey)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
decrypt(byte[] encrypted)
Decrypts the encrypted data based on the key as provided
in the constructor
|
byte[] |
encrypt(java.lang.String cipherText)
Encrypts the given text using the key as provided in the constructor
|
static byte[] |
passwordToKey(java.lang.String password) |
public AES(java.lang.String skey)
skey
- - the key to be used for encryption an decryptionpublic static byte[] passwordToKey(java.lang.String password)
public byte[] encrypt(java.lang.String cipherText)
cipherText
- - the text to be encryptedpublic java.lang.String decrypt(byte[] encrypted)
encrypted
- - the encrypted data