CipherConfiguration

Reads and writes SQLite Multiple Ciphers configuration.

Every parameter here can be read or written as either transient, only affecting the current connection until it is closed, or permanent, becoming the new default for connections opened afterward. Reads default to transient and writes default to permanent. Pass the SqliteMcConfigParamPrefix that matches what is actually wanted to override either default.

Properties

Link copied to clipboard

Cipher used to encrypt the database for the current connection only.

Link copied to clipboard

Whether the HMAC is validated on read operations for the current connection only, for cipher schemes that use one.

Link copied to clipboard

Whether the legacy mode for WAL journal encryption is used for the current connection only.

Functions

Link copied to clipboard
abstract fun getCipher(prefix: SqliteMcConfigParamPrefix = None): SqliteMcCipher

Returns the cipher used to encrypt the database.

Link copied to clipboard

Returns whether the HMAC is validated on read operations, for cipher schemes that use one.

Link copied to clipboard

Returns whether the legacy mode for WAL journal encryption is used.

Link copied to clipboard

Returns the readable and writable parameters for cipher.

Link copied to clipboard

Returns the readable and writable parameters for the dynamic cipher named after name.

Link copied to clipboard
abstract fun <Cipher : SqliteMcCipher> setCipher(cipher: Cipher, prefix: SqliteMcConfigParamPrefix.ReadWrite = Default, configure: CipherParameters<Cipher>.() -> Unit? = null)

Sets the cipher used to encrypt the database. See SqliteMcCodecType for the builtin ciphers.

Link copied to clipboard

Sets the dynamic cipher to be used for encrypting the database, using its name.

Link copied to clipboard
abstract fun setHmacCheckEnabled(enabled: Boolean, prefix: SqliteMcConfigParamPrefix.ReadWrite = Default)

Sets whether the HMAC is validated on read operations, for cipher schemes that use one.

Link copied to clipboard
abstract fun setLegacyWalEnabled(enabled: Boolean, prefix: SqliteMcConfigParamPrefix.ReadWrite = Default)

Sets whether the legacy mode for WAL journal encryption is used.