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
<PackageReference Include="Restling.Storage.Relational" Version="1.80.0" />
<PackageVersion Include="Restling.Storage.Relational" Version="1.80.0" />
<PackageReference Include="Restling.Storage.Relational" />
paket add Restling.Storage.Relational --version 1.80.0
#r "nuget: Restling.Storage.Relational, 1.80.0"
#:package Restling.Storage.Relational@1.80.0
#addin nuget:?package=Restling.Storage.Relational&version=1.80.0
#tool nuget:?package=Restling.Storage.Relational&version=1.80.0
Restling.Storage.Relational
Restling.Storage.Relational provides SQLite cookie persistence through a single SqliteCookieStorageProvider. The provider supports two explicit modes:
SqliteCookieEncryptionMode.Nonestores cookie properties in ordinary relational columns.SqliteCookieEncryptionMode.Applicationstores 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 | Versions 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. |
-
net10.0
- Microsoft.Data.Sqlite (>= 10.0.11)
- Restling (>= 1.80.0)
-
net8.0
- Microsoft.Data.Sqlite (>= 10.0.11)
- Restling (>= 1.80.0)
-
net9.0
- Microsoft.Data.Sqlite (>= 10.0.11)
- Restling (>= 1.80.0)
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.