Secure Android SharedPreferences
Did you know the data stored in local storage or shared preferences can be hacked? What if the data stored is very confidential - can be user details, api keys or some other important data which you cannot afford losing. Securing app’s data has become very important as they have become easy to exploit targets. Android Jetpack provides a Security library which can help secure the data. Here are two simple classes which will help you secure your data stored in files and shared preferences. These classes are part of the Security Library of Android Jetpack. EncryptedFile - To secure app's local storage files. EncryptedSharedPreferences - To secure app's shared preferences. In this blog we are going to talk about EncryptedSharedPreferences and how it is different from existing SharedPreferences class . What is SharedPreferences ? A SharedPreferences object points to a file containing key-value pairs and provides simple methods to read and w...