![]() |
VOOZH | about |
dotnet add package SQLite3MC.PCLRaw.bundle --version 2.3.5
NuGet\Install-Package SQLite3MC.PCLRaw.bundle -Version 2.3.5
<PackageReference Include="SQLite3MC.PCLRaw.bundle" Version="2.3.5" />
<PackageVersion Include="SQLite3MC.PCLRaw.bundle" Version="2.3.5" />Directory.Packages.props
<PackageReference Include="SQLite3MC.PCLRaw.bundle" />Project file
paket add SQLite3MC.PCLRaw.bundle --version 2.3.5
#r "nuget: SQLite3MC.PCLRaw.bundle, 2.3.5"
#:package SQLite3MC.PCLRaw.bundle@2.3.5
#addin nuget:?package=SQLite3MC.PCLRaw.bundle&version=2.3.5Install as a Cake Addin
#tool nuget:?package=SQLite3MC.PCLRaw.bundle&version=2.3.5Install as a Cake Tool
This library provides C#/.NET bindings for SQLite3 Multiple Ciphers. It leverages SQLitePCLRaw to create the bindings.
The latest version is available on NuGet.
dotnet add package SQLite3MC.PCLRaw.bundle
⚠️ Warning! Don't use multiple SQLitePCLRaw bundles in the same project. See the instructions below for details.
Because the bindings are built using SQLitePCLRaw, you can use them with various .NET libraries.
For Microsoft.Data.Sqlite, be sure to use the Microsoft.Data.Sqlite.Core package instead of the main one to avoid using multiple bundles.
using Microsoft.Data.Sqlite;
using var connection = new SqliteConnection("Data Source=example.db;Password=Password12!");
connection.Open();
var command = connection.CreateCommand();
command.CommandText = "select sqlite3mc_version()";
var version = (string)command.ExecuteScalar()!;
Console.WriteLine(version);
Use Dapper with Microsoft.Data.Sqlite by following the same instructions detailed above.
using Dapper;
using Microsoft.Data.Sqlite;
using var connection = new SqliteConnection("Data Source=example.db;Password=Password12!");
var version = connection.ExecuteScalar<string>("select sqlite3mc_version()");
Console.WriteLine(version);
EF Core is built on top of Microsoft.Data.Sqlite. Be sure to use the Microsoft.EntityFrameworkCore.Sqlite.Core package instead of the main one to avoid using multiple bundles.
options.UseSqlite("Data Source=example.db;Password=Password12!");
With SQLite-net, be sure to use the sqlite-net-base package instead of the main one to avoid using multiple bundles.
using SQLite;
SQLitePCL.Batteries_V2.Init();
var connection = new SQLiteConnection(new("example.db", storeDateTimeAsTicks: true, key: "Password12!"));
var version = connection.ExecuteScalar<string>("select sqlite3mc_version()");
Console.WriteLine(version);
If you really want to use the low-level bindings directly, you can. But these are primarly intended to be used by libraries like Microsoft.Data.Sqlite and SQLite-net.
using static SQLitePCL.raw;
SQLitePCL.Batteries_V2.Init();
var rc = sqlite3_open("example.db", out var db);
if (rc != SQLITE_OK) return;
using (db)
{
rc = sqlite3_key(db, "Password12!"u8);
if (rc != SQLITE_OK) return;
rc = sqlite3_prepare_v2(db, "select sqlite3mc_version()", out var stmt);
if (rc != SQLITE_OK) return;
using (stmt)
{
rc = sqlite3_step(stmt);
if (rc != SQLITE_ROW) return;
var version = sqlite3_column_text(stmt, 0).utf8_to_string();
Console.WriteLine(version);
}
}
This NuGet package supports access to encrypted SQLite databases from .NET applications. It is based on the project SQLite3 Multiple Ciphers.
SQLite3 Multiple Ciphers is an extension to the public domain version of SQLite that allows applications to read and write encrypted database files. Currently 7 different encryption cipher schemes are supported:
In addition to reading and writing encrypted database files it is also possible to read and write plain unencrypted database files.
SQLite3 Multiple Ciphers transparently encrypts the entire database file, so that an encrypted SQLite database file appears to be white noise to an outside observer. Not only the database files themselves, but also journal files are encrypted.
For a detailed documentation of the currently supported cipher schemes, their configuration options, and the SQL interface please consult the SQLite3MultipleCiphers website.
For accessing a database encrypted with the default cipher scheme specifying just the name of the database file as the Data Source and the passphrase as the Password in the connection string is sufficient:
using var connection = new SqliteConnection("Data Source=example.db;Password=Password12!");
Note: The password property will only work (again) with .Net 10, which was released in November 2025. In earlier .Net versions, this unfortunately leads to an error because the behavior of the underlying SQLite library has changed since version 3.48.0.
For database files encrypted with a non-default cipher scheme the connection string looks a bit different. The following examples illustrate two common use cases.
If you want to access a database created for example by bundle_e_sqlcipher (or any other tool supporting the original SQLCipher cipher scheme), it is necessary to configure the cipher scheme on establishing the database connection, because SQLCipher is not the default cipher scheme.
The easiest approach to accomplish this is to specify the data source in the connection string as a Uniform Resource Identifier (URI) including the required configuration parameters as URI parameters. In case of SQLCipher two configuration parameters are required:
cipher=sqlcipher - select the SQLCipher cipher schemelegacy=4 - select the current SQLCipher version 4 (in use since November 2018)The resulting connection string looks like this:
using var connection = new SqliteConnection("Data Source=file:example.db?cipher=sqlcipher&legacy=4;Password=Password12!");
Note:
For prior SQLCipher versions use the matching version number as the value of the legacy parameter. For non-default SQLCipher encryption variants you may need to specify additional parameters. For a detailed list of parameters see the SQLite3 Multiple Ciphers documentation.
If you want to access a database created for example by System.Data.SQLite, it is again necessary to configure the cipher scheme on establishing the database connection.
The easiest approach to accomplish this is to specify the data source in the connection string as a Uniform Resource Identifier (URI) including the required configuration parameters as URI parameters. In case of System.Data.SQLITE RC4 one or two configuration parameters are required:
cipher=rc4 - select the System.Data.SQLITE RC4 cipher schemelegacy_page_size=<page size in bytes> - optional, if the database uses the default SQLite page size (currently 4096 bytes); required, if a non-default page size is used.The resulting connection string looks like this:
using var connection = new SqliteConnection("Data Source=file:example.db?cipher=rc4;Password=Password12!");
SQLite3 Multiple Ciphers NuGet is free software and is licensed under the .
The following people have contributed to SQLite3 Multiple Ciphers NuGet:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 4 NuGet packages that depend on SQLite3MC.PCLRaw.bundle:
| Package | Downloads |
|---|---|
|
Akavache.Sqlite3
Package Description |
|
|
Akavache.EncryptedSqlite3
Package Description |
|
|
Akavache.Settings
Package Description |
|
|
Akavache.V10toV11
Package Description |
Showing the top 3 popular GitHub repositories that depend on SQLite3MC.PCLRaw.bundle:
| Repository | Stars |
|---|---|
|
dotnet/efcore
EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
|
|
|
reactiveui/Akavache
An asynchronous, persistent key-value store created for writing desktop and mobile applications, based on SQLite3. Akavache is great for both storing important data as well as cached local data that expires.
|
|
|
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK.
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2.3.5 | 563 | 6/6/2026 | |
| 2.3.4 | 4,421 | 5/6/2026 | |
| 2.3.3 | 11,174 | 4/11/2026 | |
| 2.3.2 | 964 | 3/19/2026 | |
| 2.3.1 | 271 | 3/14/2026 | |
| 2.3.0 | 195 | 3/8/2026 | 2.3.0 is deprecated. |
| 2.2.7 | 8,808 | 1/11/2026 | |
| 2.2.6 | 911 | 11/30/2025 | |
| 2.2.5-rc.1 | 413 | 11/18/2025 |