Skip to content
This repository was archived by the owner on Mar 1, 2022. It is now read-only.

Commit e825d04

Browse files
committed
Fixed tests, bumped version, slight tweaks to docs,
1 parent a5b8921 commit e825d04

File tree

6 files changed

+129
-86
lines changed

6 files changed

+129
-86
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Secure-preferences
33

44
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-secure--preferences-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/362)
55

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.
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 SHA 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 preferences file and so can be read and extracted by root user.** Recommend use the user password generated option as added in v0.1.0.
77

88
The sample app is available on [playstore](https://play.google.com/store/apps/details?id=com.securepreferences.sample)
99

@@ -13,19 +13,22 @@ The sample app is available on [playstore](https://play.google.com/store/apps/de
1313
##New release v0.1.0
1414
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.
1515

16+
[Full list of changes](changes.md)
17+
1618
#Usage
1719

1820
##Dependency
1921

20-
Maven central is the prefered way:
22+
Maven central is the preferred way:
2123

2224
```java
2325
dependencies {
2426
compile 'com.scottyab:secure-preferences-lib:0.0.4'
2527
}
2628
```
2729

28-
Or clone this repo and add the library as a Android library project/module.
30+
###Download
31+
Or download the release .aar or clone this repo and add the library as a Android library project/module.
2932

3033
#Examples
3134
This will use the default shared pref file
@@ -35,15 +38,15 @@ This will use the default shared pref file
3538
```
3639

3740
##Custom pref file
38-
You can define a seperate file for encrpyted preferences.
41+
You can define a separate file for encrypted preferences.
3942

4043
```java
4144
SharedPreferences prefs = new SecurePreferences(context, null, "my_custom_prefs.xml");
4245
```
4346

4447

4548
##User password
46-
Passing in a password to the SecurePreferences contructor means the key is generated at runtime and *not* stored in the backing pref file.
49+
Passing in a password to the SecurePreferences constructor means the key is generated at runtime and *not* stored in the backing pref file.
4750

4851
```java
4952
SharedPreferences prefs = new SecurePreferences(context, "userpassword", "my_user_prefs.xml");
@@ -88,8 +91,8 @@ SharedPreferences keys and values are stored as simple map in an XML file.
8891

8992

9093
###Disclaimer
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.*
94+
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 modifying your app's shared prefs.
95+
*Recommend using the user password based prefs as introduced in v0.1.0.*
9396

9497

9598
###Contributing
@@ -119,4 +122,4 @@ Apache License, Version 2.0
119122
limitations under the License.
120123

121124

122-
Lock icon for sample app licenced under creativecommons created by Sam Smith via [thenounproject.com](http://thenounproject.com/term/lock/5704/)
125+
The sample app Lock icon for sample app licenced under Creative Commons created by Sam Smith via [thenounproject.com](http://thenounproject.com/term/lock/5704/)

changes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
##Release Notes:
22
0.1.0
3-
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.
3+
This release is a major refactor of the guts of secure prefs, which is *Not backwards compatible* with 0.4.0 and older versions _yet!_. So if you have an existing app using this don't upgrade. I'll be looking to add migration into a later release.
44

55
* uses a new and stronger [Crypto library](https://github.com/scottyab/java-aes-crypto) under the hood
66
* includes PRNG fixes that effects JellyBean devices as per [google dev blog article](http://android-developers.blogspot.nl/2013/08/some-securerandom-thoughts.html)
@@ -9,11 +9,11 @@ This release is a major refactor of the guts of secure prefs, which is *Not back
99
* updated sample app
1010
* removed test project and added tests as part of main project
1111
* refactored library project to standard gradle structure
12-
* published to maven central
12+
* published to maven central/added github release
1313

1414

1515
0.0.4
16-
* Gralde support thanks @yelinaung
16+
* Gradle support thanks @yelinaung
1717
* Fix for OnPreferenceChanged listener @richardleggett
1818

1919
0.0.3

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
VERSION_NAME=0.0.5
2-
VERSION_CODE=5
1+
VERSION_NAME=0.1.0-SNAPSHOT
2+
VERSION_CODE=10
33
GROUP=com.scottyab
44

55

0 commit comments

Comments
 (0)