I have been experimenting with SQLcipher recently for usage on iOS applications, I manage to extract the iOS keychains that contain the PRAGMA key for an SQLcipher encrypted SQLite database. With that, I was able to decrypt the SQLite database and read it using the SQLite DB Browser.
My current goal is being able to encrypt back the database so that iOS applications are able to read the database. I have been attempting to encrypt back the database with reference to this blog post.
Using this method, I was able to encrypt the database but unable to keep the headers of the database. In the blog post, it mentions that the PRAGMA key cannot be reused to encrypt back the database so does the database get encrypted back the same way using the sqlcipher_export? Also, I was using the cipher_plaintext_header_size = 32 but was unable to retain any headers following the encryption methods in the blog post mentioned earlier, how should I encrypt back the database keeping the original database headers?