Tool for (de-)obfuscating strings. Uses by default 128 bit AES in CBC mode with PKCS#5 padding with a hard-coded key and iv. See user's guide for more information and source code for full details.
Constructor and description |
---|
StringObfuscatorTool
() Default constructor. |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
deobfuscate(java.lang.String encHex) Hex decode, decipher, unpad and UTF-8 decode given string. |
|
java.lang.String |
obfuscate(java.lang.String plain) UTF-8 encode, pad with random bytes, encipher and hex encode given string. |
|
StringObfuscatorTool |
setByteBufferPadLen(int len) Set the length to which to pad the plain string as UTF-8 encoded byte buffer. |
|
StringObfuscatorTool |
setParameters(java.lang.String hexKey, java.lang.String hexIv, java.lang.String algorithm, java.lang.String transformation) Set key, iv, algorithm and transformation. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Default constructor. Chooses 128 bit AES (AES/CBC/PKCS5Padding) with a hard-coded default key and iv, and sets byteBufferPadLen to 64, which limits plain strings to max 47 characters (resp. less if some plain string characters need more than one byte UTF-8 encoded).
Hex decode, decipher, unpad and UTF-8 decode given string.
UTF-8 encode, pad with random bytes, encipher and hex encode given string.
Set the length to which to pad the plain string as UTF-8 encoded byte buffer.
Set key, iv, algorithm and transformation.