Open sqlite connection from &[u8]
#3731
Replies: 2 comments 2 replies
-
Just realized that a potential |
Beta Was this translation helpful? Give feedback.
-
You could probably implement something like this using
However, if you don't need a specific encrypted format and just need the database file to be encrypted, might I suggest using the existing support for SQLCipher? It's not documented at all... and I just realized it's not actually exposed as a feature by |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a use case where I'd need to read an encrypted sqlite file from the filesystem and I ideally I would not want to store the de-crypted database on the filesystem.
The de-crypt function would return the sqlite bytes as
&[u8]
and I'd need to have some sort of sqlite database:memory:
to work with. As soon as I'm done with my queries I would then need to take those bytes, encrypt them and finally writing the filesystem.Is this something that's possible with sqlx? If not, is there a workaround to achieve something similar? Maybe storing the database in a similar format that I can then easily migrate into
sqlite::memory:
?The current POC that I've created basically does the following:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions