Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encrypting a DB File in Android

Tags:

android

In my Android application I want to encrypt a db file. How can I do that?

like image 398
arams Avatar asked Jan 23 '23 09:01

arams


1 Answers

The DB, normally, is stored in your application directory which is only accessible to the user-id assigned to your application.

I don't think there's any way to explicitly encrypt the DB using the android framework but an easier approach would be to encrypt the information you store in the DB. That works well if your user needs to enter some password to access the application and you can use this password to encrypt your information. But if your application doesn't require any password login then you will have to keep the encryption key in code and the security of your data will be compromised if some decompiles your application and finds the key.

like image 189
Prashast Avatar answered Jan 25 '23 21:01

Prashast