Skip to main content

disable

Function disable 

Source
pub fn disable(
    key: &[u8; 32],
    progress: &dyn Fn(MigrationProgress),
) -> Result<(), String>
Expand description

Disable encryption inside a single SQLite transaction.

All mutations (event decryption, seed/pkey/PIVX decryption, flag updates) are wrapped in one transaction on the write connection. If anything fails or the app crashes before COMMIT, the database stays fully encrypted. This prevents the mixed plaintext/ciphertext state (audit C3/C4).

Memory-efficient: collects only event IDs upfront, processes one at a time.