atg.projects.store.crypto
Interface Encryptor

All Known Implementing Classes:
AbstractEncryptor, DESedeEncryptor, DESEncryptor

public interface Encryptor

A simple interface for performing encryption/decryption operations.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 void acceptDecryptKey(byte[] pValue)
          Sets the key property.
 void acceptEncryptKey(byte[] pValue)
          Sets the pValue property.
 byte[] decrypt(byte[] pValue)
          Decrypts encrypted pValue byte[].
 java.lang.String decrypt(java.lang.String pValue)
          Decrypts encrypted pValue string.
 byte[] encrypt(byte[] pValue)
          Encrypts pValue byte[].
 java.lang.String encrypt(java.lang.String pValue)
          Encrypts pValue string.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

acceptEncryptKey

void acceptEncryptKey(byte[] pValue)
                      throws EncryptorException
Sets the pValue property. This must get called before any encryption operations take place.

Parameters:
pValue - The byte[] to set as the key property.
Throws:
EncryptorException - This exception indicates that a severe error occured while performing a cryptograpy operation.

acceptDecryptKey

void acceptDecryptKey(byte[] pValue)
                      throws EncryptorException
Sets the key property. This must get called before any encryption operations take place.

Parameters:
pValue - The byte[] to set as the key property.
Throws:
EncryptorException - This exception indicates that a severe error occured while performing a cryptograpy operation.

encrypt

java.lang.String encrypt(java.lang.String pValue)
                         throws EncryptorException
Encrypts pValue string.

Parameters:
pValue - String to encrypt.
Returns:
Encrypted string.
Throws:
EncryptorException - This exception indicates that a severe error occured while performing a cryptograpy operation.

encrypt

byte[] encrypt(byte[] pValue)
               throws EncryptorException
Encrypts pValue byte[].

Parameters:
pValue - byte[] array to encrypt.
Returns:
encrypted byte[] array
Throws:
EncryptorException - This exception indicates that a severe error occured while performing a cryptograpy operation.

decrypt

java.lang.String decrypt(java.lang.String pValue)
                         throws EncryptorException
Decrypts encrypted pValue string.

Parameters:
pValue - encrypted String
Returns:
decrypted String
Throws:
EncryptorException - This exception indicates that a severe error occured while performing a cryptograpy operation.

decrypt

byte[] decrypt(byte[] pValue)
               throws EncryptorException
Decrypts encrypted pValue byte[].

Parameters:
pValue - encrypted array of byte[]
Returns:
decrypted array of byte[]
Throws:
EncryptorException - This exception indicates that a severe error occured while performing a cryptograpy operation.