I am using SQLite database in my application. I want to make my SQLite database password protected.
2 Answers
HWACI (the commercial arm behind SQLite development) provides (for money) an encryption engine called SEE. It's quite painless to integrate this in if you are building your own SQLite source, and it's also very easy to use.
SQLCipher is an open source alternative to SEE. I've never used it but I would expect it's as easy to integrate and use as SEE.
Comments
As far as I know: no, you can't do it in a simply way.
Posible choices:
-You could simply encrypt the data you want to be secure when inserting it and decrypting the values when you want to play with them. In my opinion this is the best choice.
-You could encrypt the db file in your app's folder. And decrypt it every time you want to access it (not very recommended).
Also note that your DB file is stored in your app's private directory, so in most terminals (except for rooted ones) neither the user nor other apps will have r/w access.
EDIT: For the first choice, I recommend you to take a look to mah's answer if you don't want to implement your own encryption methods =)