Using DBFlow, how to encrypt an existing database?

I use DBFlow to process the databases in my project, and I want the existing database to be encrypted.

I know that I will probably have to abandon the existing unencrypted database and create another encrypted one. And I also know that I can use SQLCipher with DBFlow, as the documentation describes.

My question is: how and when should I drop the database and how to recreate it without asking users to uninstall the application? Can this be done through migrations?

Please provide some code on how to achieve this. Thanks.

+5
source share
1 answer

Another possible solution I can come up with is to use hardware level encryption to encrypt mobile memory.

http://itstillworks.com/encrypted-memory-card-3090.html

http://www.lg.com/us/mobile-phones/VS930/JB/Userguide/basics_memory_encryption.html

0
source

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


All Articles