Sqlite db security

2020-06-23 06:13发布

问题:

Im building an app which uses Sqlite DB. Users can enter their information into the db and retrieve them. However, I want them to be able to backup the sqlite db. What I did was putting the sqlite db in the documents folder, so they could retrieve it out using iTunes. For example if the ipad is faulty, i want them to be able to transfer the sqlite db to another ipad.

The problem now is, I dont want them to know the information inside the db, should say the db structure. So how can I build a db that is able to read by my application only? and when they use sqlite browser to open, they wont be able to see anything. I'm looking for something simple. Possible to have the db to prompt a password before opening it?

回答1:

Here is the link to your answer, SQLCipher is the best thing, which will encrypt the whole database and if any one get the database from the iOS device, any how , still it will prompt for a password otherwise is will not allow user to see the same. even with Command prompt the user will not be able to see the database.

Hope this will be usefull....