Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 659 Bytes

sqlciphersupport.md

File metadata and controls

34 lines (27 loc) · 659 Bytes

SQLCipher

Android only. Add the SQLCipher artifact and swap the open helper.

dbflow-sqlcipher = { module = "com.dbflow5:sqlcipher", version.ref = "dbflow" }
commonMain.dependencies {
    implementation(libs.dbflow.lib)
}
androidMain.dependencies {
    implementation(libs.dbflow.sqlcipher)
}
val db = createDB<CipherDatabase>(context) {
    copy(
        name = "Secure",
        openHelperCreator = SQLCipherOpenHelper.createHelperCreator(context, secret = "your-secret"),
    )
}

Use the generated database the same as a normal one.

R8:

-keep class net.sqlcipher.** { *; }
-dontwarn net.sqlcipher.**