DB File Encryption on Android

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

+3
source share
2 answers

The database is usually stored in your application directory, which is available only for the user ID assigned to your application.

I don’t think that there is any way to explicitly encrypt the database using the android framework, but a simpler approach would be to encrypt the information that you store in the database. This works well if your user needs to enter a password to access the application, and you can use this password to encrypt your information. But if your application does not require a password, you will need to save the encryption key in the code, and the security of your data will be compromised if any one decompiles your application and finds the key.

+4
source

Sun has an article that explains how to use AES encryption here . As far as I can tell, all the necessary libraries are available on Android.

+4
source

Source: https://habr.com/ru/post/1714295/


All Articles