2

Is there a way to make Community Edition of SQLCipher work in .NET after compiling? From what i was able to gather it seems that it's a C/C++ library.

Or are there any alternatives (free preferred) that can do the same thing? I'm trying to encrypt my SQLite .db file and then be able to decrypt it for use in .NET program.

Thanks.

Lampa
  • 75
  • 4
  • You could write your own interface code to the native library DLL from a .NET app with P/Invoke. It would likely be a lot of work. You might be better off looking at one of the available .NET wrappers, or the commercial edition libraries. – Stephen Lombardo Jul 10 '17 at 14:31

1 Answers1

0

The sqlite-net-sqlcipher NuGet package provides a free open source implementation that supports reading and writing SQLite files encrypted with SQLCipher.

var options = new SQLiteConnectionString(databasePath, true,
    key: "password");
var encryptedDb = new SQLiteAsyncConnection(options);
rjschnorenberg
  • 661
  • 1
  • 9
  • 30
  • 1
    Thank you responding, this was a fairly old question I have resolved already, but I'm marking this comment as the solution, in case anyone else stumbles upon it in the future. – Lampa Oct 15 '22 at 07:08