org.gudy.azureus2.ui.console.util
Class StringEncrypter

java.lang.Object
  extended by org.gudy.azureus2.ui.console.util.StringEncrypter

public class StringEncrypter
extends Object

utility class to encrypt strings. this class was taken from the examples at: http://www.devx.com/Java/10MinuteSolution/21385/0/page/2


Nested Class Summary
static class StringEncrypter.EncryptionException
           
 
Field Summary
static String DEFAULT_ENCRYPTION_KEY
           
static String DES_ENCRYPTION_SCHEME
           
static String DESEDE_ENCRYPTION_SCHEME
           
 
Constructor Summary
StringEncrypter(String encryptionScheme)
           
StringEncrypter(String encryptionScheme, String encryptionKey)
           
 
Method Summary
 String decrypt(String encryptedString)
           
 String encrypt(String unencryptedString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESEDE_ENCRYPTION_SCHEME

public static final String DESEDE_ENCRYPTION_SCHEME
See Also:
Constant Field Values

DES_ENCRYPTION_SCHEME

public static final String DES_ENCRYPTION_SCHEME
See Also:
Constant Field Values

DEFAULT_ENCRYPTION_KEY

public static final String DEFAULT_ENCRYPTION_KEY
See Also:
Constant Field Values
Constructor Detail

StringEncrypter

public StringEncrypter(String encryptionScheme)
                throws StringEncrypter.EncryptionException
Throws:
StringEncrypter.EncryptionException

StringEncrypter

public StringEncrypter(String encryptionScheme,
                       String encryptionKey)
                throws StringEncrypter.EncryptionException
Throws:
StringEncrypter.EncryptionException
Method Detail

encrypt

public String encrypt(String unencryptedString)
               throws StringEncrypter.EncryptionException
Throws:
StringEncrypter.EncryptionException

decrypt

public String decrypt(String encryptedString)
               throws StringEncrypter.EncryptionException
Throws:
StringEncrypter.EncryptionException