From SQLCipher <https://github.com/sqlcipher/sqlci...
# squarelibraries
y
From SQLCipher https://github.com/sqlcipher/sqlcipher-android I see how can we do for Room db android. If have to do the same with SQLDelight how can i do with AndroidDriver?
Copy code
System.loadLibrary("sqlcipher");
String password = "Password1!";
File databaseFile = context.getDatabasePath("demo.db");
SupportOpenHelperFactory factory = new SupportOpenHelperFactory("password.getBytes(StandardCharsets.UTF_8));
db = Room.databaseBuilder(context, AppDatabase.class, databaseFile.getAbsolutePath())
        .openHelperFactory(factory).build();
j
Please don't ask in multiple places at once
👍 1
y
@jw Something like this
Copy code
override fun createDriver(): SqlDriver {
    //System.loadLibrary("sqlcipher") initialize on app launch
    val password = "Password1!"
    val factory = SupportOpenHelperFactory(password.toByte())
    return AndroidSqliteDriver(
        databaseInfo.schema,
        context,
        databaseInfo.name,
        factory
    )
}
with this all the tables data in db will be encrypted automatically and on read data will be decrypted automatically? no extra work here?
Confirm the working of SqlCipher with Sqldelight for Android and KMP Android