Android database encryption, is currently sqlcipher to SQLite overall encryption, is also used this way. Open source, and support many platforms.
Sqlcipher Although open source, but compiled jar and so file, still have to charge.
But what do I want to do with Ormlite? Then integrate ormlite and Sqlcipher together!
1.There are 2 ways to integrate Sqlcipher. The second type is used here.
Address: Https://www.zetetic.net/sqlcipher/sqlcipher-for-android/
Sqlcipher jar packages and so files:
http://download.csdn.net/download/feixing345/9760335
2.Ormlite Integration Method:
Address: http://ormlite.com/javadoc/ormlite-core/doc-files/ormlite_1.html#Getting-Started
Download 2 jar imports to use. Specific how to use can refer to other people write blog.
3.Ormlite Formal Integration Sqlcipher
principle: The Sqlcipher.jar package basically rewrites all the classes in the Android.database package, replacing all the net.sqlcipher packages. The Ormlite-android.jar database operation uses Android.database. So just need to download Ormlite-android.jar source code, the database operation of the way to replace the net.sqlcipher can be
3.1 First download the open source ormlite-android source in GitHub.
: https://github.com/j256/ormlite-android
Copy the source code to Android studio and you need to download and import the Ormlite-core.jar into the project.
Next, import the Sqlcipher compiled jar and so files:
Finally, the ormlite-android source code in Android.database replacement Net.sqlcipher can be.
:
http://download.csdn.net/download/u013914149/10121251
Ormlite Integrated Sqlcipher