Sqlite db security

点点圈 提交于 2020-01-22 15:23:08

问题


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....



来源:https://stackoverflow.com/questions/11044261/sqlite-db-security

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!