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?
SQLite engine do not have built-in security to protect databases, rather, it relies on its environment such as the operating system to provide security for database content. While Android provides security mechanisms for SQLite databases, it has been shown to be inadequate.
You can password protect a SQLite3 DB. Before doing any operations, set the password as follows. conn = new SQLiteConnection("Data Source=MyDatabase. sqlite;Version=3;Password=password;"); conn.
Most CVEs written about SQLite assume that the attacker is able to run arbitrary SQL scripts in SQLite. In most applications, this means that there must first be an SQL Injection vulnerability that allows the attacker to inject the malicious SQL.
One of the pros in our SQLite pros and cons list is that it's serverless, boosting speed and lowering complexity. However, it also means that the database is confined to the machine it's stored on only. It doesn't allow for remote work on another PC, for instance.
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....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With