storesafe/cordova-sqlcipher-adapter

Same sqlite Database can be accessed with encryption key and without encryption key

ubhardwaj opened this issue · 1 comments

I have implemented this plugin in my code, I have created a database using the below command
var db = window.sqlitePlugin.openDatabase({ name: 'mydb', key: 'encryptionkey', location: 'default' });
and created a student table and insert a record. after that I tried to access the same database using same app but with out encryption key using below statement.
var db2 = window.sqlitePlugin.openDatabase({ name: 'mydb', location: 'default' });
I found that table I created using "db" object is accessible using "db2" object, it means I can access the data without key then what is relevance of key, and how can I make sure that my data in phone is encrypted.

I am hereby attaching my code please suggest.
sqlite-cipher.txt

The best way to check is by closing the database before attempting to open it without the password.