I am using Room database in my project and AES encryption of some User fields like first name and last name. I would like the database to be unencrypted in Build Config Debug. How can I achieve this?
Asked
Active
Viewed 36 times
0
-
As far as I understand the db is not encrypted right? Only some fields. So i suggest put some if-else'es to avoid encryption if you build debug version – Shlomi Katriel Mar 17 '23 at 06:55
-
@ShlomiKatriel yes, you understood correctly. the entire database is not encrypted, only the user's first and last name. But the problem is that my database expects BLOB datatype and if I don't encrypt fields then TEXT datatype comes – Денис Mar 17 '23 at 07:41
-
Does this help? https://stackoverflow.com/questions/14435072/sqlite-how-to-castdata-as-text-for-blob – Shlomi Katriel Mar 18 '23 at 15:30