How to encrypt the database when using Room?

FVod picture FVod · Jul 10, 2017 · Viewed 7.2k times · Source

We'd like to use Room in the application we are developing, but we need to encrypt the database. I know that there was SQLCipher in order to encrypt an SQL database (although I have never used it), but I think that it does not support API level 16 and higher methods, so I think that Room is not supported. On the other hand, there's Realm that supports encryption, but I would really like to use Room instead. How could we encrypt the database then?

Thanks a lot

Answer

CommonsWare picture CommonsWare · Jul 10, 2017

I think that it does not support API level 16 and higher methods, so I think that Room is not supported

Well, so far, my CWAC-SafeRoom library is holding up, though the testing on it has been light so far. It will get more of a workout in the coming months.