Package-level declarations

Types

Link copied to clipboard
internal typealias DatabaseRekey = (databaseFile: File, legacyKey: ByteArray, rawKey: ByteArray) -> Unit

Rekeys databaseFile from legacyKey to rawKey. Injectable so callers can test the failure paths.

Link copied to clipboard
internal class SqliteCallback(schema: <Error class: unknown class><<Error class: unknown class><Unit>>, enableWAL: Boolean)
Link copied to clipboard
class SupportOpenHelperFactory(password: ByteArray?, enableWriteAheadLogging: Boolean = false, hook: <Error class: unknown class>? = null, minimumSupportedDatabaseVersion: Int = 1)

Functions

Link copied to clipboard
internal fun canOpenDatabase(databaseFile: File, key: ByteArray, verifyIntegrity: Boolean = false): Boolean
Link copied to clipboard
internal fun globalDatabaseKey(databaseFile: File, rawKey: ByteArray, legacyKey: ByteArray?, rekey: DatabaseRekey = ::rekeyDatabase, onMigrated: () -> Unit): ByteArray

Returns the key the global database should be opened with, rekeying it to rawKey first if it is still on legacyKey.