How to connect to Password protected SQLite DB with OrmLite? How to connect to Password protected SQLite DB with OrmLite? sqlite sqlite

How to connect to Password protected SQLite DB with OrmLite?


You must use SQLCipher with OrmLite, I would suggest ormlite-sqlcipher library to you


OrmLiteSqliteOpenHelper has a constructor which takes a password so change you super call to

super(context, DATABASE_NAME, null, DATABASE_VERSION, (File)null, "DB password goes here");

I would take the call to copyFromAssets(context) out of the DatabaseHelper constructor and call it before DatabaseHelper gets created i.e. first thing when the app starts up