com.universaldevices.security
Class AES

java.lang.Object
  extended by com.universaldevices.security.AES

public class AES
extends java.lang.Object

This class encapsulates AES encryption funcationality

Author:
UD Architect

Constructor Summary
AES(java.lang.String skey)
          Constructor
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AES

public AES(java.lang.String skey)
Constructor

Parameters:
skey - - the key to be used for encryption an decryption
Method Detail

passwordToKey

public static byte[] passwordToKey(java.lang.String password)

encrypt

public byte[] encrypt(java.lang.String cipherText)
Encrypts the given text using the key as provided in the constructor

Parameters:
cipherText - - the text to be encrypted
Returns:
- the encrypted version of the text

decrypt

public java.lang.String decrypt(byte[] encrypted)
Decrypts the encrypted data based on the key as provided in the constructor

Parameters:
encrypted - - the encrypted data
Returns:
- the decrypted text