com.digitalsanctuary.atg.crypto
Class AESEncryptor

java.lang.Object
  extended bycom.digitalsanctuary.atg.crypto.AbstractEncryptor
      extended bycom.digitalsanctuary.atg.crypto.AESEncryptor
All Implemented Interfaces:
java.io.Serializable

public class AESEncryptor
extends AbstractEncryptor

A simple class for performing encryption/decryption operations using the AES cipher. * * @author Devon Hillard

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.digitalsanctuary.atg.crypto.AbstractEncryptor
CHAR_SET
 
Constructor Summary
AESEncryptor(byte[] pKey)
           
AESEncryptor(java.lang.String pKey)
           
 
Method Summary
protected  java.lang.String getAlgorithmName()
          Returns the name of the algorithm this encryptor should use.
 
Methods inherited from class com.digitalsanctuary.atg.crypto.AbstractEncryptor
computeMAC, decrypt, decrypt, encrypt, encrypt, setKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AESEncryptor

public AESEncryptor(byte[] pKey)
             throws EncryptorException
Parameters:
pKey - * the byte[] key which should be used to instantiate the encryptor. * @throws EncryptorException * if the encryptor cannot be instantiated using the key and algorithm provided.

AESEncryptor

public AESEncryptor(java.lang.String pKey)
             throws EncryptorException
Parameters:
pKey - * the String key which should be used to instantiate the encryptor. * @throws EncryptorException * if the encryptor cannot be instantiated using the key and algorithm provided.
Method Detail

getAlgorithmName

protected java.lang.String getAlgorithmName()
Returns the name of the algorithm this encryptor should use. * * @return "AES"

Specified by:
getAlgorithmName in class AbstractEncryptor
Returns:
the Algorithm name for this instance of the encryptor.