mercredi 29 avril 2015

Android Sqlite database encrypt/decrypt or password protected

What I just want to know how can we secure out Sqlite Database. I have gone through many discussion but didn't find any answer suitable. As I feel we cannot secure the database 100%.

I find few option code:

SQLiteConnection conn = new SQLiteConnection("Data Source=MyDatabase.sqlite;Version=3;");
conn.SetPassword("password");
conn.open();

In the above code I am unable to import SQLiteConnection

Also I try to use Sqlcipher but it leads to me encryption/decryption of data in row(i;e encryption/decryption data one by one).(Worthwhile but still few drawbacks like for hitting a query we need to decyrpt the data first and then match the query, which is obfuscate)

Is there any way we can password protect the sqlite database even if the hacker get the db it will be of no use without password?

But it leads to one more question that where we should save the password?

because we cannot save the password in source code as it can be easily reverse engineer by hackers.

So I just want to confirm what are the possible ways that we can protect the sqlite database at extreme end so that it will be difficult for the hackers to crack.Looking for the good responses.Thanks in advance

NOTE:please don't copy paste any discussion from stackoverflow as I have gone through almost every discussion.

Aucun commentaire:

Enregistrer un commentaire