Skip to content

using wxsqlite or sqlite3 multiple ciphers #2836

Answered by packadal
packadal asked this question in Q&A
Discussion options

You must be logged in to vote

I managed to pass the cipher to sqlx, using
pragma("cipher", "sqlcipher").pragma("key", format!("'{}'", passphrasr.replace('\'', "''"))

This is not pretty, but it works (the ' char needs to be escaped in case your key contains one of those, and it is escaped by doubling it in sqlite)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@packadal
Comment options

Answer selected by packadal
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