6

I'm creating a 2d game for Android and i'm using sqlite database for storing game data.Rooted users can change database easily.So i have to encrypt the data and when someone change it i have to understand this.How can i do this?

4
  • 4
    Bear in mind that this will be pointless. Rooted users will be able to get your encryption key out of your app and use that to decrypt whatever you have encrypted. Commented Jul 8, 2012 at 13:40
  • I (pronoun) Commented Jul 8, 2012 at 17:10
  • 1
    possible duplicate of android database encryption Commented Jul 9, 2012 at 0:23
  • I truly believe that the rooted users can change your database regardless of the encryption. They can get the key to decrypt the db. I'm researching on it as well. Have you found any solutions? Commented Feb 25, 2019 at 3:47

2 Answers 2

12

Take a look to the SQLCipher project. It is an open source library that provides transparent, secure 256-bit AES encryption of SQLite database files.

The web site offers a tutorial for Android.

Sign up to request clarification or add additional context in comments.

Comments

2

SQLCipher + user's password could be the right implementation. We need user's password to encrypt the db rather than using the hard-coded strings.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.