Closed KadamMangesh closed 8 years ago
@MangeshKadam Please check the sample application.
Create key by
String key = KeyGenerator.get(KeystoreApplication.getAppContext(),
KeystoreApplication.getAppContext().getPackageName())
.loadOrGenerateKeys();
Obtain an instance of ObscuredSharedPreferences using ObscuredPreferencesBuilder as follows:
SharedPreferences sharedPreferences = new ObscuredPreferencesBuilder()
.setApplication(KeystoreApplication.getAppContext())
.obfuscateValue(true)
.obfuscateKey(true)
.setSharePrefFileName(PREFS_NAME)
.setSecret(key) //secret key we generated in step 1.
.createSharedPrefs();
now use the instance of sharedPreferences created above to save/fetch data.
Hey @MangeshKadam Can we close this issue?
Hi thanks. you can close this issue.
I want to securely save some sensitive data in shared pref. Later I need to decrypt the encrypted data and use in application. How I can achieve this using secure preferences library?