setReKey

abstract fun setReKey(key: ByteArray, size: Int = key.size, database: String = SQLITE_MAIN_DB_NAME)(source)

Changes the database encryption key.

For a dynamic cipher, the cipher must be selected again through ksqlite.kapi.cipher.CipherConfiguration.setCipher right before calling this, even if it was already selected earlier on the same connection. Otherwise this silently does nothing instead of failing.

Throws

if an error happened while setting the key.