|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectatg.projects.store.crypto.AbstractEncryptor
public abstract class AbstractEncryptor
A simple abstract class for performing encryption/decryption.
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
| Constructor Summary | |
|---|---|
AbstractEncryptor()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
acceptDecryptKey(byte[] pValue)
Sets the key property. |
void |
acceptEncryptKey(byte[] pValue)
Sets the pValue property. |
protected byte[] |
decodeToByteArray(java.lang.String pValue)
Override this method to decode the data back into raw encrypted data if you have used a character encoder. |
byte[] |
decrypt(byte[] pValue)
Decrypts encrypted pValue byte[]. |
java.lang.String |
decrypt(java.lang.String pValue)
Decrypts encrypted pValue string. |
protected abstract void |
doAcceptDecryptKey(byte[] pValue)
Implement this to accept a byte array as a key. |
protected abstract void |
doAcceptEncryptKey(byte[] pValue)
Implement this to accept a byte array as a key. |
protected abstract byte[] |
doDecrypt(byte[] pValue)
Implement this with the actual decryption operation. |
protected abstract byte[] |
doEncrypt(byte[] pValue)
Implement this with the actual encryption operation. |
protected abstract void |
doInit()
Implement this and do your init. |
protected java.lang.String |
encodeToString(byte[] pValue)
Override this method if encoding of the raw encrypted data is necessary. |
byte[] |
encrypt(byte[] pValue)
Encrypts pValue byte[]. |
java.lang.String |
encrypt(java.lang.String pValue)
Encrypts pValue string. |
protected void |
init()
Call this init method before every cryptograpy operation. |
protected byte[] |
postDecrypt(byte[] pValue)
Process pValue after decrypt. |
protected java.lang.String |
postDecrypt(java.lang.String pValue)
Process pValue after decrypt. |
protected byte[] |
postEncrypt(byte[] pValue)
Process pValue after encrypt. |
protected java.lang.String |
postEncrypt(java.lang.String pValue)
Process pValue after encrypt. |
protected byte[] |
preDecrypt(byte[] pValue)
Process pValue before decrypt. |
protected java.lang.String |
preDecrypt(java.lang.String pValue)
Process pValue before decrypt. |
protected byte[] |
preEncrypt(byte[] pValue)
Process pValue before encrypt. |
protected java.lang.String |
preEncrypt(java.lang.String pValue)
Process pValue before encrypt. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CLASS_VERSION
| Constructor Detail |
|---|
public AbstractEncryptor()
| Method Detail |
|---|
public final void acceptEncryptKey(byte[] pValue)
throws EncryptorException
pValue property. This must get called before any
encryption operations take place.
acceptEncryptKey in interface EncryptorpValue - The byte[] to set as the key property.
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
public final void acceptDecryptKey(byte[] pValue)
throws EncryptorException
key property. This must get called before any
encryption operations take place.
acceptDecryptKey in interface EncryptorpValue - The byte[] to set as the key property.
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected final void init()
throws EncryptorException
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
public final java.lang.String encrypt(java.lang.String pValue)
throws EncryptorException
pValue string.
encrypt in interface EncryptorpValue - String to encrypt.
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
public final java.lang.String decrypt(java.lang.String pValue)
throws EncryptorException
pValue string.
decrypt in interface EncryptorpValue - encrypted String
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
public final byte[] encrypt(byte[] pValue)
throws EncryptorException
pValue byte[].
encrypt in interface EncryptorpValue - byte[] array to encrypt.
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
public final byte[] decrypt(byte[] pValue)
throws EncryptorException
pValue byte[].
decrypt in interface EncryptorpValue - encrypted array of byte[]
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected java.lang.String preEncrypt(java.lang.String pValue)
throws EncryptorException
pValue before encrypt.
pValue - String to encrypt
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected java.lang.String preDecrypt(java.lang.String pValue)
throws EncryptorException
pValue before decrypt.
pValue - String to decrypt
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected java.lang.String postEncrypt(java.lang.String pValue)
throws EncryptorException
pValue after encrypt.
pValue - String after encryption
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected java.lang.String postDecrypt(java.lang.String pValue)
throws EncryptorException
pValue after decrypt.
pValue - String after decryption
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected byte[] preEncrypt(byte[] pValue)
throws EncryptorException
pValue before encrypt.
pValue - byte[] to encrypt
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected byte[] preDecrypt(byte[] pValue)
throws EncryptorException
pValue before decrypt.
pValue - byte[] to decrypt
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected byte[] postEncrypt(byte[] pValue)
throws EncryptorException
pValue after encrypt.
pValue - byte[] after encryption
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected byte[] postDecrypt(byte[] pValue)
throws EncryptorException
pValue after decrypt.
pValue - byte[] after decryption
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected java.lang.String encodeToString(byte[] pValue)
throws EncryptorException
pValue - array of byte[] to encrypt
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected byte[] decodeToByteArray(java.lang.String pValue)
throws EncryptorException
pValue - string to decode
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected abstract void doAcceptEncryptKey(byte[] pValue)
throws EncryptorException
pValue - byte array
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected abstract void doAcceptDecryptKey(byte[] pValue)
throws EncryptorException
pValue - byte array
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected abstract void doInit()
throws EncryptorException
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected abstract byte[] doEncrypt(byte[] pValue)
throws EncryptorException
pValue - array of bytes
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
protected abstract byte[] doDecrypt(byte[] pValue)
throws EncryptorException
pValue - array of bytes
EncryptorException - This exception indicates that a severe error
occured while performing a cryptograpy operation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||