ActiveAndroid icon indicating copy to clipboard operation
ActiveAndroid copied to clipboard

sqllite encryption

Open Jaware opened this issue 12 years ago • 19 comments

for security,can ActiveAndroid encrypte sqllite ?

Jaware avatar Sep 08 '14 07:09 Jaware

See this stack overflow question and its answers. ActiveAndroid does not have this built in.

SleeplessByte avatar Sep 17 '14 17:09 SleeplessByte

@SleeplessByte thanks,i will try

Jaware avatar Sep 18 '14 03:09 Jaware

It would be pretty straightforward for ActiveAndroid to include support for SQLCipher using the SQLCipher-for-Android library. It is literally the same API as android.database since it was made by ripping out that code from Android itself, then wrapper that around SQLCipher instead of SQLite. So to use with code that is built around android.database, you just change the package names for the imports, then handle the password and you're done. SQLCipher is just SQLite with encryption support, so it is entirely compatible. I'm one of the developers of SQLCipher-for-Android, so I'm happy to help this idea allow where possible.

I see it like this: ActiveAndroid presents a method for setting the password for the database. If SQLCipher is present, and that method is used, then ActiveAndroid switches to using SQLCipher instead of android.database.

eighthave avatar Sep 19 '14 15:09 eighthave

@eighthave thanks ,i will try

Jaware avatar Sep 20 '14 10:09 Jaware

@eighthave i tried ,but not succeed,the error is : No implementation found for void net.sqlcipher.database.SQLiteDatabase.dbopen;can you help me 囧

Jaware avatar Sep 20 '14 14:09 Jaware

i also tried https://github.com/zsiegel/ActiveAndroid-Secure; still not work,both gradle and ant not work

Jaware avatar Sep 20 '14 14:09 Jaware

Ah, ActiveAndroid-Secure is already using SQLCipher, but it seems not in a unified approach. Looks like ActiveAndroid-Secure is missing the name libraries for SQLCipher, there needs to be some .so files in libs in addition to sqlcipher.jar. Download SQLCipher-for-Android and include that.

eighthave avatar Sep 21 '14 00:09 eighthave

@eighthave sorry ,when i use eclipse it works, the reason is that gradle does not load the so library even i put it into libs ,right way is src/main/jniLibs. thank you very much

Jaware avatar Sep 21 '14 04:09 Jaware

when i use ActiveAndroid-Secure with sqlcipher its throwing error like native method not [email protected] but i tried without using ActiveAndroid Sqlcipher is working let me know whts the issue with ActiveAndroid

NovopayVinay avatar Oct 30 '15 07:10 NovopayVinay

Same issue for me as well. Let me know any one done same kind of task. Need some help. Thank you

nilkashid avatar Jan 14 '16 09:01 nilkashid

Hi eighthave, I have integrated the ActiveAndroid Secure but when I run the application it gets crash java.lang.UnsatisfiedLinkError: No implementation found for void net.sqlcipher.database.SQLiteDatabase.dbopen(java.lang.String, int) (tried Java_net_sqlcipher_database_SQLiteDatabase_dbopen . Steps I have done https://github.com/zsiegel/ActiveAndroid-Secure , I have taken the Active Android Secure build my .jar file and then included in my Android Studio structure within libs folder -->ActiveAndroid.jar Within the ActiveAndroid .jar file I have included the the jniLib folders the path of the jniLib folder is as can you please help me I am stuck

vive18 avatar Jan 09 '17 11:01 vive18

Sounds like you are missing the SQLCipher-for-Android library, check http://sqlcipher.net for more info.

eighthave avatar Jan 09 '17 12:01 eighthave

Hi Chris,

Thanks for the mail I had even added the Sqlcipher jar and also the realted JNI files too , but now I am getting error No database helper Class found can you please tell me where I had done the worng in in integrating .

Thank you please help me to solve as I am stuck bro.

On Mon, Jan 9, 2017 at 6:27 PM, Hans-Christoph Steiner < [email protected]> wrote:

Sounds like you are missing the SQLCipher-for-Android library, check http://sqlcipher.net for more info.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pardom/ActiveAndroid/issues/268#issuecomment-271275305, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJQcK8apxc1tUsfmSzBJdtd6aielSGXks5rQitEgaJpZM4Cfe0s .

-- Thank You & Regards Vivek Sharma

vive18 avatar Jan 09 '17 14:01 vive18

We've moved to gradle since things like this are much easier. Seems like you are not using gradle. For non-gradle builds, you'll have to figure out how to unpack the AAR files for SQLCipher-for-Android and put them where your build system expects them.

eighthave avatar Jan 09 '17 15:01 eighthave

No no I am using Android Studio as directed in this link I did the same https://github.com/zsiegel/ActiveAndroid-Secure,but in this repo there is no folder of JNI, but he have included the SqlCipher jar and other supporting jar files

On Mon, Jan 9, 2017 at 9:04 PM, Hans-Christoph Steiner < [email protected]> wrote:

We've moved to gradle since things like this are much easier. Seems like you are not using gradle. For non-gradle builds, you'll have to figure out how to unpack the AAR files for SQLCipher-for-Android and put them where your build system expects them.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pardom/ActiveAndroid/issues/268#issuecomment-271310656, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJQcJjHhxATOvoCKgeaaMYzIcGxSLHgks5rQlAJgaJpZM4Cfe0s .

-- Thank You & Regards Vivek Sharma

vive18 avatar Jan 09 '17 15:01 vive18

use the gradle 'compile' lines, do not import the JARs, .so files or AARs.

eighthave avatar Jan 09 '17 15:01 eighthave

so u mean i need to write compile 'com......' in this form but as SQLCipher +Active Android how to integrate can you please the provide the grade build code snippet

On Mon, Jan 9, 2017 at 9:34 PM, Hans-Christoph Steiner < [email protected]> wrote:

use the gradle 'compile' lines, do not import the JARs, .so files or AARs.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pardom/ActiveAndroid/issues/268#issuecomment-271318871, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJQcA2o_gNmymM6pfNm_G8Sb4EymXTxks5rQlb2gaJpZM4Cfe0s .

-- Thank You & Regards Vivek Sharma

vive18 avatar Jan 09 '17 16:01 vive18

you mean this way compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT' but this only integrate Active android but i need ActiveAndriod+SqlCipher so how to do please suggest

On Mon, Jan 9, 2017 at 9:57 PM, Vivek Sharma [email protected] wrote:

so u mean i need to write compile 'com......' in this form but as SQLCipher +Active Android how to integrate can you please the provide the grade build code snippet

On Mon, Jan 9, 2017 at 9:34 PM, Hans-Christoph Steiner < [email protected]> wrote:

use the gradle 'compile' lines, do not import the JARs, .so files or AARs.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pardom/ActiveAndroid/issues/268#issuecomment-271318871, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJQcA2o_gNmymM6pfNm_G8Sb4EymXTxks5rQlb2gaJpZM4Cfe0s .

-- Thank You & Regards Vivek Sharma

-- Thank You & Regards Vivek Sharma

vive18 avatar Jan 09 '17 16:01 vive18

https://www.zetetic.net/blog/2016/4/5/sqlcipher-340-release/

eighthave avatar Jan 09 '17 18:01 eighthave