|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.projects.store.crypto.AbstractEncryptor atg.projects.store.crypto.DESEncryptor
public class DESEncryptor
A simple class for performing encryption/decryption operations using the javax.crypto package.
Field Summary | |
---|---|
protected static java.lang.String |
ALGORITHM
Crypto algorithm name. |
static java.lang.String |
CLASS_VERSION
Class version string |
protected static java.lang.String |
KEY
24 byte key string. |
Constructor Summary | |
---|---|
DESEncryptor()
Default constructor. |
Method Summary | |
---|---|
protected byte[] |
decodeToByteArray(java.lang.String pValue)
Decode to byte array. |
protected void |
doAcceptDecryptKey(byte[] pValue)
This is two way encryption, so encrypt/decrypt keys are the same. |
protected void |
doAcceptEncryptKey(byte[] pValue)
This is two way encryption, so encrypt/decrypt keys are the same. |
protected byte[] |
doDecrypt(byte[] pValue)
Performs decription of array of bytes. |
protected byte[] |
doEncrypt(byte[] pValue)
Performs encryption of array of bytes. |
protected void |
doInit()
Initialize DESEncrytor. |
protected java.lang.String |
encodeToString(byte[] pValue)
Once encrypted, string data may no longer be a string because the encrypted data is binary and may contain null characters, thus it may need to be encoded using a encoder such as Base64, UUEncode (ASCII only) or UCEncode(ASCII independent). |
Methods inherited from class atg.projects.store.crypto.AbstractEncryptor |
---|
acceptDecryptKey, acceptEncryptKey, decrypt, decrypt, encrypt, encrypt, init, postDecrypt, postDecrypt, postEncrypt, postEncrypt, preDecrypt, preDecrypt, preEncrypt, preEncrypt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected static final java.lang.String ALGORITHM
protected static final java.lang.String KEY
Constructor Detail |
---|
public DESEncryptor()
Method Detail |
---|
protected final void doAcceptEncryptKey(byte[] pValue) throws EncryptorException
doAcceptEncryptKey
in class AbstractEncryptor
pValue
- - key
EncryptorException
- if encryption error occursprotected final void doAcceptDecryptKey(byte[] pValue) throws EncryptorException
doAcceptDecryptKey
in class AbstractEncryptor
pValue
- - key
EncryptorException
- if encryption error occursprotected final void doInit() throws EncryptorException
doInit
in class AbstractEncryptor
EncryptorException
- This exception indicates that a severe error
occured while performing a cryptograpy operation.protected final byte[] doEncrypt(byte[] pValue) throws EncryptorException
doEncrypt
in class AbstractEncryptor
pValue
- array of bytes to encrypt
EncryptorException
- This exception indicates that a severe error
occured while performing a cryptograpy operation.protected final byte[] doDecrypt(byte[] pValue) throws EncryptorException
doDecrypt
in class AbstractEncryptor
pValue
- decrypt array of bytes
EncryptorException
- This exception indicates that a severe error
occured while performing a cryptograpy operation.protected java.lang.String encodeToString(byte[] pValue) throws EncryptorException
encodeToString
in class AbstractEncryptor
pValue
- Value to encode
EncryptorException
- This exception indicates that an error
occured while performing a cryptograpy operation.protected byte[] decodeToByteArray(java.lang.String pValue) throws EncryptorException
decodeToByteArray
in class AbstractEncryptor
pValue
- - value to decode
EncryptorException
- if encryption error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |