Restling.Storage.Relational 1.80.0

dotnet add package Restling.Storage.Relational --version 1.80.0
                    
NuGet\Install-Package Restling.Storage.Relational -Version 1.80.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Restling.Storage.Relational" Version="1.80.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Restling.Storage.Relational" Version="1.80.0" />
                    
Directory.Packages.props
<PackageReference Include="Restling.Storage.Relational" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Restling.Storage.Relational --version 1.80.0
                    
#r "nuget: Restling.Storage.Relational, 1.80.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Restling.Storage.Relational@1.80.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Restling.Storage.Relational&version=1.80.0
                    
Install as a Cake Addin
#tool nuget:?package=Restling.Storage.Relational&version=1.80.0
                    
Install as a Cake Tool

Restling.Storage.Relational

Restling.Storage.Relational provides SQLite cookie persistence through a single SqliteCookieStorageProvider. The provider supports two explicit modes:

  • SqliteCookieEncryptionMode.None stores cookie properties in ordinary relational columns.
  • SqliteCookieEncryptionMode.Application stores only an HMAC-SHA-256 blind index and an AES-256-GCM authenticated payload for each cookie.

The database records its mode and schema version. Opening it with a different mode fails instead of silently reading or rewriting the other representation; changing mode requires an explicit migration.

using AMDevIT.Restling.Core.Cookies.Storage.Security;
using AMDevIT.Restling.Storage.Relational;

SqliteCookieStorageOptions options = new()
{
    FilePath = databasePath,
    EncryptionMode = SqliteCookieEncryptionMode.Application,
    DataEncryptionKeyProtector = keyProtector
};
SqliteCookieStorageProvider storage = new(options);

Automatic persistence is enabled by default. Change notifications are coalesced into one flush after three seconds; SaveAsync() flushes immediately, and orderly disposal performs a final flush. Set AutoSave = false when the application must control every write explicitly.

Application encryption generates a random 256-bit data-encryption key (DEK). Separate encryption and blind-index keys are derived from it, while the DEK itself is persisted only after protection by the supplied IDataEncryptionKeyProtector. Keep the protecting key outside the database in a platform keychain, secure store, or hardware-backed facility.

This mode protects cookie names, values, domains, paths, and metadata against offline disclosure and detects row tampering. It is not whole-database encryption: the SQLite schema, metadata, number and approximate size of records, update times, and database file structure remain observable. It also does not prevent rollback or deletion of the database. Protect the file with operating-system permissions and use full-database encryption when those leaks are unacceptable.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.80.0 46 9/8/2026

First implementation of the SQLite provider for Restling cookie persistance.