C++: How to reuse Encrypted Sqlite database in MFC

2019-02-21 05:10发布

问题:

I am in the middle of one project where I want to reuse SQLite database of iOS application in my MFC\C++ application.

The iOS database is encrypted using 'sqlite3_key()' and it is using SQLCipher for database handling.

And

I am using SQLiteEncrypt for databse handling with the help of CppSQLite3 Wrapper.

But when I am trying to execute any statement on database it throws and exception File is encrypted or not a database .

I not getting any lead on this.

Can any one help me out on this?

I know its duplicate of the following question but that questions are Inactive and I am not able to get any answer from that question.

1.How to use SQLite database from one platform(iOS) to another(Windows)

2.How to open and read SQLite database from another platform like (iOS to Windows)

Please Help me out on this.

回答1:

SQLite provides common interface for encryption, but the implementation of the encryption engine is delivered by individual vendors.

Encryption engines on the market are not compatible, you have to use the one that was used to encrypt the database.