SealiteConfig

How SQLCipher reads and writes the file. DEFAULT matches SQLCipher 4, so files are interchangeable with net.zetetic:sqlcipher-android 4.x, SQLCipher for Apple platforms and the sqlcipher command line tool.

The configuration must describe the file: a database written with other settings fails to open with SealiteError.WRONG_KEY, exactly like a wrong key.

val legacy = SealiteConfig { compatibility = SealiteConfig.Compatibility.SQLCIPHER_3 }
// Java: SealiteConfig.builder().compatibility(Compatibility.SQLCIPHER_3).build()

Built only through Builder, so options can be added in minor releases without breaking binaries.

Types

Link copied to clipboard
class Builder

Builds a SealiteConfig; every option starts at the SQLCipher 4 default.

Link copied to clipboard
object Companion
Link copied to clipboard

SQLCipher major-version defaults (cipher, KDF, HMAC, page size). New versions may be added in minor releases: keep an else branch when matching.

Properties

Link copied to clipboard

The SQLCipher major version whose defaults apply.

Link copied to clipboard

PBKDF2 iterations for SealiteKey.passphrase keys; null keeps the compatibility default. Raw keys do not run a key derivation. Lowering it weakens passphrase keys.

Link copied to clipboard

Page size in bytes, a power of two from 512 to 65536; null keeps the compatibility default.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

A copy of this configuration to change.

Link copied to clipboard
open override fun toString(): String