com.android.vending.licensing
Interface Obfuscator

All Known Implementing Classes:
AESObfuscator

public interface Obfuscator

Interface used as part of a Policy to allow application authors to obfuscate licensing data that will be stored into a SharedPreferences file.

Any transformation scheme must be reversable. 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.


Method Summary
 java.lang.String obfuscate(java.lang.String original)
          Obfuscate a string that is being stored into shared preferences.
 java.lang.String unobfuscate(java.lang.String obfuscated)
          Undo the transformation applied to data by the obfuscate() method.
 

Method Detail

obfuscate

java.lang.String obfuscate(java.lang.String original)
Obfuscate a string that is being stored into shared preferences.

Parameters:
original - The data that is to be obfuscated.
Returns:
A tranformed version of the original data.

unobfuscate

java.lang.String unobfuscate(java.lang.String obfuscated)
                             throws ValidationException
Undo the transformation applied to data by the obfuscate() method.

Parameters:
original - The data that is to be obfuscated.
Returns:
A tranformed version of the original data.
Throws:
ValidationException - Optionally thrown if a data integrity check fails.