Setting Password For Android Sqlite Database
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
- Ask for two passwords...
- encrypt one with other then compare the hash with the one in database
- continue to next
- 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"