i am not able to understand Pre-Key and Post-Key SQL
PRAGMA has been a part of major SQL databases for a couple of decades. Roughly speaking, it is a way to configure a database connection on the fly. Sometimes, you will be given instructions to execute some
PRAGMA statements to do something or another. In the case of SQLCipher for Android, they use
PRAGMA statements to configure the encryption (algorithm, key-lengthening approach, etc.).
However, for configuring encryption, we need to do that before we try decrypting parts of the database, not after. So, SQLCipher for Android offers “pre-key SQL” and “post-key SQL”:
Pre-key SQL is executed before SQLCipher for Android tries decrypting anything from the database
Post-key SQL is executed after SQLCipher for Android has successfully decrypted the first bits of the database
If you have questions about SQLCipher for Android, Zetetic has their own discussion board, similar to this one.