5

-Using Android-Room i'm working on a project where i have to make an android app with a pre populated encrypted SQLite database stored in the Assets folder .

-When dealing with a non encrypted database i managed to copy the database file from the assets folder using this library: https://github.com/humazed/RoomAsset ;

-But when adding encryption to the Mix :

i realised Room doesn't provide any encryption support so i had to use this library: https://github.com/commonsguy/cwac-saferoom , it worked perfectly when a new database is created on runtime . But i can't make it work when the database is already encrypted and copied from the assets folder of the app

-Is there a way to use both libraries to do this ? or any other solution for my problem ?

Thanks in advance .

0v3rFl0w
  • 45
  • 5
  • The point behind SafeRoom, and SQLCipher for Android, is for the *user* to supply a passphrase, to secure the *user's* data. What you are describing is DRM, and neither SQLCipher for Android nor SafeRoom are designed for that scenario. – CommonsWare Oct 24 '18 at 21:33

0 Answers0