storesafe / cordova-sqlcipher-adapter

A Cordova/PhoneGap plugin to create and access encrypted databases on Android, iOS, and Windows with API similar to HTML5/Web SQL API
Other
89 stars 55 forks source link

Plugin does not work with Worklight 6.2 #13

Open busbyk opened 9 years ago

busbyk commented 9 years ago

Hi,

Issue is specific to the Android environment in Worklight 6.2 (IBM MobileFirst).

File names conflict with Worklight JSONstore file names (i.e. the sqlcipher.jar and .so libraries for each architecture). So, if you are trying to include this plugin but do not have JSONstore enabled, the files are removed during the Android environment build. If you enable JSONstore, the build will replace the files with the Worklight version of them.


Is it possible for you to release a version of this plugin that has slightly different naming?


Worklight uses the exact same file names as yours. The exact files I'm referring to:

android/sqlcipher/libs/sqlcipher.jar android/sqlcipher/libs/[armeabi | armeabi-v7a | x86]libdatabase_sqlcipher.so android/sqlcipher/libs/[armeabi | armeabi-v7a | x86]libsqlcipher_android.so android/sqlcipher/libs/[armeabi | armeabi-v7a | x86]libstlport_shared.so

From what I've read, I've gathered that Worklight uses version 2.1 of sqlcipher. If you know of an easy way to implement the current (or an older) version of your plugin using version 2.1 of sqlcipher please let me know.

Any assistance on this would be very helpful, thanks!

brodycj commented 9 years ago

I will keep this idea under consideration, and am not sure that I want to support it for free. To change the file naming would involve rebuilding SQLCipher for Android and rebuilding it every time they make a release. In addition, it would be impossible to get support from them in case anything goes wrong.

I am extremely reluctant to support older versions of SQLCipher for multiple reasons. In general, security software is constantly updated to support new algorithms and mechanisms and resist increasingly smarter attacks. Another thing is that in case anything goes wrong, the upstream SQLCipher project will also ask us to upgrade.

Considering that SQLCipher is now at 3.3.1, I highly recommend that you ask IBM to either give you an update with SQLCipher 3.3.1 or give you a way to upgrade the SQLCipher for Android library yourself.

You can also make a fork of this project and modify plugin.xml to omit the sqlcipher libraries in your installation.

Hamasn commented 8 years ago

I got the same issue with MFP7.1(worklight),it used the old version of SQLCipher, and can not use this plug in as well. I think we'd better use the latest version, rather the old one. But IBM worklight didn't.