![]() ![]() SlLog.i(“SL_DATABASE”, “DB encrypted successfully”) St.bindString(1, originalFile.absolutePath)ĭb.rawExecSQL(“SELECT sqlcipher_export(‘main’, ‘plaintext’)”)ĭb.rawExecSQL(“DETACH DATABASE plaintext”) Val st: SQLiteStatement = db.compileStatement(“ATTACH DATABASE ? AS plaintext KEY ‘’”) I used the below code to encrypt the data fun encrypt(context: Context, databaseName: String, passphrase: ByteArray) ”)ĭb = SQLiteDatabase.openDatabase(newFile.absolutePath, passphrase, null, SQLiteDatabase.OPEN_READWRITE, null, null) Any help you can give would be greatly appreciated. ![]() i checked that Passphrase also correct, no where it is getting changed. I have a plain room db in my application, i used “ net.zetetic:android-database-sqlcipher:4.4.0” to encrypt the database it working fine in development phase, but after application released into the market getting random crashes as saying “Fatal Exception: file is not a database:, while compiling: select count(*) from sqlite_master ”, and we are not able reproduce the same in our end.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |