Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encrypt android sqlite database?

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?

like image 833
droidmachine Avatar asked Jul 08 '12 12:07

droidmachine


2 Answers

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.

like image 140
Jonathan Naguin Avatar answered Oct 29 '22 18:10

Jonathan Naguin


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.

like image 21
Ender Avatar answered Oct 29 '22 18:10

Ender