| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.util.StringEncrypter
public class StringEncrypter
Encrypts and decrypts string using Java Cryptography Extension (JCE)
| Nested Class Summary | |
|---|---|
| static class | StringEncrypter.EncryptionExceptionException Wrapper for any error that might occur during the encryption or decryption process. | 
| Field Summary | |
|---|---|
| static String | DES_ENCRYPTION_SCHEMEDES encryption scheme. | 
| static String | DESEDE_ENCRYPTION_SCHEMEDES3 (DESede) encryption scheme. | 
| static String | REVISION | 
| Constructor Summary | |
|---|---|
| StringEncrypter(String encryptionScheme,
                String encryptionKey)Create a new StringEncrypter using the specified encryption scheme and key. | |
| Method Summary | |
|---|---|
|  String | decrypt(String encryptedString)Decrypt the specified string using this StringEncrypter. | 
|  String | encrypt(String unencryptedString)Encrypt the specified string using this StringEncrypter. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String REVISION
public static final String DESEDE_ENCRYPTION_SCHEME
public static final String DES_ENCRYPTION_SCHEME
| Constructor Detail | 
|---|
public StringEncrypter(String encryptionScheme,
                       String encryptionKey)
                throws StringEncrypter.EncryptionException
encryptionScheme - an encryption scheme from one of the following :
 DESEDE_ENCRYPTION_SCHEME or DES_ENCRYPTION_SCHEMEencryptionKey - the key to use for the encrypter, must be a
        valid string of 24 or more characters, must not be null.
IllegalArgumentException - if encryptionKey is null or less than 24 characters
StringEncrypter.EncryptionException| Method Detail | 
|---|
public String encrypt(String unencryptedString)
               throws StringEncrypter.EncryptionException
unencryptedString - the string to encrypt, must not be null or empty.
IllegalArgumentException - if unencryptedString is null or empty
StringEncrypter.EncryptionException
public String decrypt(String encryptedString)
               throws StringEncrypter.EncryptionException
encryptedString - the string to decrypt, must not be null or empty.
IllegalArgumentException - if encryptedString is null or empty
StringEncrypter.EncryptionException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||