|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vividsolutions.jump.util.SimpleStringEncrypter
public class SimpleStringEncrypter
Provides a simple encyrption/decryption mechanism for ASCII string values. The algorithm does not provide strong encryption, but serves as a way of obfuscating the value of short strings (such as passwords). The code symbol set is drawn from the set of printable ASCII symbols. The encrypted strings are longer than the clear text (roughly double in length). A random element is used, so that different encryptions of the same clear text will result in different encodings.
| Constructor Summary | |
|---|---|
SimpleStringEncrypter()
Creates a new encrypter |
|
| Method Summary | |
|---|---|
java.lang.String |
decrypt(java.lang.String codeText)
Decrypts a code string. |
java.lang.String |
encrypt(java.lang.String clearText)
Encrypts a string. |
void |
setEncryptedSymbol(char c,
char[] code,
int i)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleStringEncrypter()
| Method Detail |
|---|
public java.lang.String encrypt(java.lang.String clearText)
clearText - the string to encrypt
public void setEncryptedSymbol(char c,
char[] code,
int i)
public java.lang.String decrypt(java.lang.String codeText)
codeText - the code to decrypt
java.lang.IllegalArgumentException - if the code string is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||