Work with SQLite Databases Encrypted using SQLitePCLRaw.bundle_e_sqlcipher

I am trying to access an Encrypted SQLite database and I tried the built-in driver for SQLite but when I supply the password it says:

You specified a password in the connection string, but the native SQLite library you're using doesn't support encryption.

So then I tried to add the Microsoft.EntityFrameworkCore.Sqlite.Core and SQLitePCLRaw.bundle_e_sqlcipher

then when I try to open a connection I get:

Unable to load DLL 'e_sqlcipher' or one of its dependencies: The specified module could not be found. (0x8007007E)

I tried to create a folder with LINQPad 6 and the output of a quick .NET Core 3.1 app I built that can open the database and that still could not find the e_sqlcipher.

Is there a way to use work with encrypted using SQLitePCLRaw.bundle_e_sqlcipher SQLite databases with LINQPad? I would be super helpful.


  • edited November 2020

    You're correct in that the native SQLite library (still) doesn't support encryption. Given that the situation hasn't changed for some time, I'll update LINQPad such that the password textbox doesn't show when the SQLite provider is chosen, as it's unhelpful for the UI to include an option that never works.

    Regarding workarounds, there are a number of solutions posted on the internet, but I have not succeeded in getting any of them to work reliably with the current EF Core releases. Hopefully this will be addressed in a future release.

Sign In or Register to comment.