Skip to content

export() to convert unencrypted to encrypted programmatically #72

Answered by utelle
JReally asked this question in Q&A
Discussion options

You must be logged in to vote

Is there an equivalent to sqlcipher_export() convenience function that can duplicate a database contents to an attached database with different settings.

Yes. The VACUUM INTO command of SQLite (see VACUUM command documentation) allows to create a copy of a database. By using an URI filename for the target of the VACUUM command you can specify and configure the cipher scheme via URI parameters.

I'm attempting to convert an unencrypted to encrypted DB programmatically. I have everything working but the sqlcipher_export() I used previously avoided all the detailed programming.

SQLite3 Multiple Ciphers allows to encrypt a plain unencrypted database in place by using a PRAGMA REKEY command…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by JReally
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants