Skip to content Skip to sidebar Skip to footer

Setting Password For Android Sqlite Database

I am designing one Custom library, in that library to store the confidential data. For storing the data i have 2 options. 1) shared preferences. 2) Sqlite3 database. If , i use Sha

Solution 1:

Hey the same Problem with me too....

I got an Solution....

The Solution is Dual Passwords :D

Here all we can do is encrypt all the data that is confidential...

Step 1 : Ask user for two Passwords ( Password1 & Password2 ) rather than a username & pass...

Step 2 : You can encrypt all the data using a Password that may be 1 or 2...

Step 3 : to decrypt that data again the same password must be used..

THE PROBLEM SOLVED: The problem is how Can we store the Passwords in the database..

ALL WE DO is encrypt the first password with the other.... ENCRYPTION AND DECRYPTION refer this link

----> http://www.androidsnippets.com/encryptdecrypt-strings <----

JUST USE THAT it works like charm

SO FINALLY HOW THE PROCESS GOES IS

  1. Ask for two passwords...
  2. encrypt one with other then compare the hash with the one in database
  3. continue to next
  4. Beware decrypt all the data before you present to user.....

Solution 2:

The company behind SQLite provides a commercial solution which you can use.

However, SQLCipher is a free (and open source) alternative that allows you to encrypt your SQLite databases.

Post a Comment for "Setting Password For Android Sqlite Database"