com.annahid.libs.artenus.security
Obfuscator
Interface used to allow application authors to obfuscate licensing data that will be stored into a SharedPreferences file.
Any transformation scheme must be reversible. Implementing classes may optionally implement an integrity check to further prevent modification to preference data. Implementing classes should use device-specific information as a key in the obfuscation algorithm to prevent obfuscated preferences from being shared among devices.
public interface Obfuscator
Method Summary
Modifier and Type | Method and Description |
---|---|
public String | obfuscate(String original, String key) Obfuscate a string that is being stored into shared preferences. |
public String | unobfuscate(String obfuscated, String key) Undo the transformation applied to data by the obfuscate() method. |
Method Detail
obfuscate | ||||
---|---|---|---|---|
public String obfuscate( String original, String key ) Obfuscate a string that is being stored into shared preferences. Parameters:
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. Parameters:
Returns:
A transformed version of the original data Throws:
|