Class SimpleStringEncrypter
java.lang.Object
com.vividsolutions.jump.util.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
Constructors -
Method Summary
-
Constructor Details
-
SimpleStringEncrypter
public SimpleStringEncrypter()Creates a new encrypter
-
-
Method Details
-
encrypt
-
setEncryptedSymbol
public void setEncryptedSymbol(char c, char[] code, int i) -
decrypt
Decrypts a code string.- Parameters:
codeText- the code to decrypt- Returns:
- the clear text for the code
- Throws:
IllegalArgumentException- if the code string is invalid
-