Opening SQLite database that is password protected

I am thinking of using a database to store my game’s text data (a series or questions and answers) because it would be cool to password protect it so that users couldn’t go in and just see what all the correct answers are (using a tool like iPhone Explorer).

Is it possible to open a database that has been password protected through the LuaSQLite 3 implementation? I didn’t see any sample code for this, so wasn’t sure. (And I haven’t tried it yet and am a complete SQLite novice, so if this is something I just missed in the tutorials I read, I apologize.)

Appreciate any responses and suggestions. [import]uid: 17827 topic_id: 11966 reply_id: 311966[/import]

Do you mean you want the data to be encrypted or just that the sqlite file should be password protected?

Either way, consider encryption of the data as that’s a more robust solution. If it’s encrypted then even if someone manages to look at the file’s contents, they’ll still only see gobbledegook and not the actual data. [import]uid: 26769 topic_id: 11966 reply_id: 43660[/import]

Well, I wanted an easy solution, and I think that encrypting all the text content just seems like it would add more to the project, both in terms of horsepower needed to run it and complexity for making updates.

I thought that password protecting the database would be an easier solution. Would protect the data and be low overhead.

Does anyone know if it that is possible using the LuaSQLite library? [import]uid: 17827 topic_id: 11966 reply_id: 43850[/import]

If you built classes for each of your tables, you could encapsulate the encrypt/decrypt logic in there.

Anyway, this link may help: http://stackoverflow.com/questions/1381264/password-protect-a-sqlite-db-is-it-possible - but I don’t know if this functionality is built-in to the SQLite on our mobile devices, and therefore whether Corona supports it or not. [import]uid: 26769 topic_id: 11966 reply_id: 43851[/import]

Eh. I wouldn’t waste the effort. I would guess that 99.99% of users have no idea it’s possible to look at your data, let alone how. [import]uid: 58455 topic_id: 11966 reply_id: 43887[/import]