Skip to content

SQLCipherSharp3 is a comprehensive .NET library that provides SQLCipher 3.x–compatible encryption and decryption for SQLite databases.

License

Notifications You must be signed in to change notification settings

BisocM/SQLCipherSharp3

Repository files navigation

NuGet version (SQLCipherSharp3)

SQLCipherSharp3

.NET library for SQLCipher 3.x–compatible SQLite encryption/decryption with hardened defaults, constant-time HMAC validation, and sync/async APIs.

Features

  • AES-256-CBC with PBKDF2 key derivation and per-page HMAC (SHA1) matching SQLCipher 3.x.
  • Constant-time HMAC verification and defensive config/input validation.
  • Sync and async APIs; configurable page/reserve sizes; ships with safe defaults.

Quick Start

using System.IO;
using System.Text;
using SQLCipherSharp3;

byte[] db = File.ReadAllBytes("db.sqlite");
byte[] pwd = Encoding.UTF8.GetBytes("secret");

var encryptor = new SqlCipherEncryptor();
byte[] enc = encryptor.Encrypt(db, pwd);

var decryptor = new SqlCipherDecryptor();
byte[] dec = decryptor.Decrypt(enc, pwd);

Install: dotnet add package SQLCipherSharp3 (version 2.0.0, net8.0).

Full usage, configuration, and contribution details: see DOCUMENTATION.md.

About

SQLCipherSharp3 is a comprehensive .NET library that provides SQLCipher 3.x–compatible encryption and decryption for SQLite databases.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages