| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.elca.el4j.util.encryption.SymmetricEncryption
public class SymmetricEncryption
Class to en- and decrypt data symetrically. CAVEAT: the encoding between byte[] and String was recently changed to adapt to the new Base64 encore (before it used a private method of sun).
| Constructor Summary | |
|---|---|
SymmetricEncryption()
 | 
|
| Method Summary | |
|---|---|
 String | 
decrypt(String encryptedString)
Decrypts a String.  | 
 byte[] | 
decryptStringToByteArray(String encryptedString)
Decrypts a String into a byte array.  | 
 String | 
encrypt(String unencryptedString)
Encrypts a String.  | 
 String | 
encryptByteArrayToString(byte[] cleartext)
Encrypts a byte array into a String.  | 
 void | 
init()
Initializes the encryptor.  | 
 void | 
setDataEncodingFormat(String dataEncodingFormat)
 | 
 void | 
setEncryptionKey(String encryptionKey)
 | 
 void | 
setEncryptionScheme(String encryptionScheme)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public SymmetricEncryption()
| Method Detail | 
|---|
public void setDataEncodingFormat(String dataEncodingFormat)
dataEncodingFormat - The dataEncodingFormat to set.public void setEncryptionKey(String encryptionKey)
encryptionKey - The encryptionKey to set.public void setEncryptionScheme(String encryptionScheme)
encryptionScheme - The encryptionScheme to set.
public void init()
          throws EncryptionException
EncryptionException - if encryption could not be initialized.
public String encrypt(String unencryptedString)
               throws EncryptionException
unencryptedString - The String to encrypt.
EncryptionException - if there was an error.
public String decrypt(String encryptedString)
               throws EncryptionException
encryptedString - The String to decrypt.
EncryptionException - if there was an error.
public String encryptByteArrayToString(byte[] cleartext)
                                throws EncryptionException
cleartext - The byte array to encrypt.
EncryptionException - if there was an error.
public byte[] decryptStringToByteArray(String encryptedString)
                                throws EncryptionException
encryptedString - The String to decrypt.
EncryptionException - if there was an error.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||