question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SQLCipher with the upcoming EF Core version: 3.0.0

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ericsinkcommented, Sep 18, 2019

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/

0reactions
danielkrautcommented, Sep 27, 2019

@bricelam:

@danielkraut Can you submit an issue on SQLitePCL.raw to track this work?

SQLitePCL issue 297

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQLCipher with the upcoming EF Core version: 3.0.0 #17910
I am in the process of updating our Microsoft.Data.Sqlite package, we are currently using v2.0.0. The transition to the official release ...
Read more >
Breaking changes included in EF Core 3.x
Complete list of breaking changes introduced in Entity Framework Core 3.x.
Read more >
Announcing Entity Framework Core 3.0 and ...
We are extremely excited to announce the general availability of EF Core 3.0and EF 6.3 on nuget.org. The final versions of .NET Core...
Read more >
SQLCipher 3.0.0 Release
SQLCipher 3.0.0 Release. 2013-11-11 17:14:25 -0500. We're excited to announce that SQLCipher 3 is now available. This release includes ...
Read more >
Entity Framework Core 3.0: A Foundation for the Future
NET Core has evolved, Entity Framework Core (EF Core) has grown increasingly sophisticated from one version to the next. EF Core was a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found