-
Hi, I'm looking to rewrite some C++ code in rust, and in doing so I would need to reuse the existing database that is encrypted using wxsqlite. Is there a way to use a custom sqlite3 implementation such as wxsqlite or sqlite multiple ciphers ? If not could I get a little guidance in how best to contribute this feature ? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
packadal
Dec 16, 2024
Replies: 1 comment 1 reply
-
@packadal Hi, I'm facing the same issue. What did you end up doing in the end? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)