Artenus 2D Framework
Artenus Reference
An Obfuscator that uses AES to encrypt data.
public class AESObfuscator
implements Obfuscator

Constructor Summary

Modifier and TypeConstructor and Description
public AESObfuscator(byte[] salt, String applicationId, String deviceId)

Method Summary

Modifier and TypeMethod and Description
public Stringobfuscate(String original, String key)
Obfuscate a string that is being stored into shared preferences.
public Stringunobfuscate(String obfuscated, String key)
Undo the transformation applied to data by the obfuscate() method.

Methods inherited from java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AESObfuscator
public  AESObfuscator(
    byte[] salt,
    String applicationId,
    String deviceId
)
Parameters:
saltan array of random bytes to use for each (un)obfuscation
applicationIdapplication identifier, e.g. the package name
deviceIddevice identifier. Use as many sources as possible to create this unique identifier.

Method Detail

obfuscate
public String obfuscate(
    String original,
    String key
)
Obfuscate a string that is being stored into shared preferences.
Specified By:
Returns:
A transformed version of the original data
unobfuscate
public String unobfuscate(
    String obfuscated,
    String key
)
Undo the transformation applied to data by the obfuscate() method.
Specified By:
Returns:
A transformed version of the original data