PRAGMA cipher_memory_security allows the user to opt in/out of specific behaviors regarding memory management within SQLCipher.
When enabled, all memory allocated for the database (including that used for page cache, temporary storage, values) will be locked on allocation, bringing the virtual address space into RAM, preventing it from being written to a swap file. When memory is released, it will be unlocked and the block will be zeroed out prior to being freed.
When this feature is disabled, locking/unlocking of the memory address only occur for the internal SQLCipher data structures used to store key material, and cryptographic structures.
PRAGMA cipher_memory_security is enabled by default.
If you wish to disable
cipher_memory_security on Android, it would likely be best performed with the
preKey event of the