com.annahid.libs.artenus.security
AESObfuscator
An Obfuscator that uses AES to encrypt data.
public class AESObfuscator implements Obfuscator
Constructor Summary
Modifier and Type | Constructor and Description |
---|---|
public | AESObfuscator(byte[] salt, String applicationId, String deviceId) |
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. |
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:
|
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 |