You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 1, 2022. It is now read-only.
This is Android Shared preference wrapper that encrypts the keys and values of Shared Preferences using 256-bit AES. **The key is stored in the perferences and so can be read and extracted by root user.**Keys and values are encrypted and base64 encooded before storing into prefs.
6
+
This is Android Shared preference wrapper that encrypts the values of Shared Preferences using AES 128, CBC, and PKCS5 padding with integrity checking in the form of a SHA 256 hash. Each key is stored as a one way HA 256 hash. Both keys and values are base64 encoded before storing into prefs xml file. **By default the generated key is stored in the backing perferences file and so can be read and extracted by root user.**Recommend use the user password generated option as added in v0.1.0.
7
7
8
-
The sample app is availbile on [playstore](https://play.google.com/store/apps/details?id=com.securepreferences.sample)
8
+
The sample app is available on [playstore](https://play.google.com/store/apps/details?id=com.securepreferences.sample)
9
9
10
-
Much of the original code is from Daniel Abraham article on [codeproject](http://www.codeproject.com/Articles/549119/Encryption-Wrapper-for-Android-SharedPreferences). This project was created and shared on Github with his permission.
This release is a major refactor of the guts of secure prefs, which is *Not backwards compatible* yet with older versions. So if you have an existing app using this don't upgrade. I'll be looking to add migration into a later release.
It's not bullet proof security (in fact it's more like obfuscation of the perferences) but it's a quick win for incrementally making your android app more secure. For instance it'll stop users on rooted devices easily modifiying your app's shared prefs.
91
+
By default it's not bullet proof security (in fact it's more like obfuscation of the preferences) but it's a quick win for incrementally making your android app more secure. For instance it'll stop users on rooted devices easily modifiying your app's shared prefs.
92
+
*Recommend using the user password based prefs as introducted in v0.1.0.*
51
93
52
94
53
95
###Contributing
54
-
Please do send me pull requests, but also bugsand enhancement requests are welcome. Although no guarantees on when I can review them.
96
+
Please do send me pull requests, but also bugs, issues and enhancement requests are welcome please add an issue.
55
97
56
98
57
99
###Licence
100
+
101
+
Much of the original code is from Daniel Abraham article on [codeproject](http://www.codeproject.com/Articles/549119/Encryption-Wrapper-for-Android-SharedPreferences). This project was created and shared on Github with his permission.
102
+
58
103
Apache License, Version 2.0
59
104
60
105
@@ -72,3 +117,6 @@ Apache License, Version 2.0
72
117
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
73
118
See the License for the specific language governing permissions and
74
119
limitations under the License.
120
+
121
+
122
+
Lock icon for sample app licenced under creativecommons created by Sam Smith via [thenounproject.com](http://thenounproject.com/term/lock/5704/)
This release is a major refactor of the guts of secure prefs, which is *Not backwards compatible* yet with older versions. So if you have an existing app using this don't upgrade. I'll be looking to add migration into a later release.
4
+
5
+
* uses a new and stronger [Crypto library](https://github.com/scottyab/java-aes-crypto) under the hood
6
+
* includes PRNG fixes that effects JellyBean devices as per [google dev blog article](http://android-developers.blogspot.nl/2013/08/some-securerandom-thoughts.html)
7
+
* supports password based key generation so the key is not persisted
8
+
* change password supported
9
+
* updated sample app
10
+
* removed test project and added tests as part of main project
11
+
* refactored library project to standard gradle structure
12
+
* published to maven central
13
+
14
+
15
+
0.0.4
16
+
* Gralde support thanks @yelinaung
17
+
* Fix for OnPreferenceChanged listener @richardleggett
18
+
19
+
0.0.3
20
+
21
+
* Added test Project
22
+
* Updated sample ready for playstore upload
23
+
24
+
0.0.2
25
+
26
+
* Added methods to get/set strings un-encrypted
27
+
* Added backup PBKDF function in case PBKDF2WithHmacSHA1 not supported
28
+
* Refactored code to make it easier to change the AES mode and PBKDF function.
29
+
* Increased iterations of PBKDF from 1000 to 2000.
30
+
31
+
0.0.1
32
+
33
+
* Initial import to github I've modified the project structure.
34
+
* Included the Android base64 class so library can be used by Android 2.1+.
35
+
* Enhanced the sample project dumps current prefs to illustrate the fact they are stored encrypted and Base64 encoded.
0 commit comments