SQLCipher with the upcoming EF Core version: 3.0.0
See original GitHub issueI am in the process of updating our Microsoft.Data.Sqlite package, we are currently using v2.0.0. The transition to the official release 2.2.6 went smoothly, but I am considering delaying the update to use v3.0.0 when it is released. But we are using the bundle_sqlitecipher (and adding PRAGMA key
after opening a connection) to enable database encryption and I was not able to figure out how to set it up to work with the current v3.0.0-rc1.19456.14.
After some digging, apparently the v3.0.0 comes with a dependency to SQLitePCL.raw v2.0.0 (#14824) but the latest bundle_sqlcipher is 1.1.14. Is my understanding correct that there is currently no way to use the new Password
property in SqliteConnectionStringBuilder
(#13828), since there is no provider which supports encryption?
I tried installing and uninstalling different sqlite bundle/provider NuGet packages but nothing worked. I always ended up either with a running app without encryption support, or after setting ExcludeAsssets:
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.0.0" ExcludeAssets="All" />
with and exception on SQLitePCL.Batteries_V2.Init()
,
v SQLitePCL.NativeLibrary.Load(String libraryName, Assembly assy, Int32 flags)
v SQLitePCL.Batteries_V2.MakeDynamic(String name, Int32 flags)
v SQLitePCL.Batteries_V2.DoDynamic_cdecl(String name, Int32 flags)
v SQLitePCL.Batteries_V2.Init()
v App.Wpf.Setup.InitializeFirstChance() ...
or trying SQLitePCL.Batteries_Init()
but with a build error
The type ‘Batteries’ exists in both ‘SQLitePCLRaw.batteries_sqlcipher …’ and ‘SQLitePCLRaw.batteries_v2 …’
So my final question is: is there a way to use the upcoming version 3.0.0 with database encryption? Do you know if there is upcoming bundle_sqlcipher v2.0.0 to support this?
Additional context
Microsoft.Data.Sqlite version: 3.0.0-rc1.19456.14 Target framework: WPF, .NET framework 4.7.2 Operating system: Windows 10
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
With the 2.0 release, the package id for bundle_sqlcipher changed to bundle_e_sqlcipher:
https://www.nuget.org/packages/SQLitePCLRaw.bundle_e_sqlcipher/
@bricelam:
SQLitePCL issue 297