MinimalCleanArch.Security 0.1.18-preview

This is a prerelease version of MinimalCleanArch.Security.
dotnet add package MinimalCleanArch.Security --version 0.1.18-preview
                    
NuGet\Install-Package MinimalCleanArch.Security -Version 0.1.18-preview
                    
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="MinimalCleanArch.Security" Version="0.1.18-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MinimalCleanArch.Security" Version="0.1.18-preview" />
                    
Directory.Packages.props
<PackageReference Include="MinimalCleanArch.Security" />
                    
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 MinimalCleanArch.Security --version 0.1.18-preview
                    
#r "nuget: MinimalCleanArch.Security, 0.1.18-preview"
                    
#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 MinimalCleanArch.Security@0.1.18-preview
                    
#: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=MinimalCleanArch.Security&version=0.1.18-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MinimalCleanArch.Security&version=0.1.18-preview&prerelease
                    
Install as a Cake Tool

MinimalCleanArch.Security

Security components for MinimalCleanArch.

Version

  • Current preview: 0.1.18-preview (net9.0, net10.0). Latest stable: 0.1.17.

Why Use It

  • encrypt sensitive values at the infrastructure layer instead of leaking encryption logic into entities or handlers
  • support both development-friendly ASP.NET Core Data Protection encryption and production-oriented key management
  • apply encrypted EF property conversions consistently across your data model

When to Use It

  • use it when the application stores secrets or sensitive fields that should be encrypted at rest, especially in EF-backed persistence models
  • keep it in infrastructure where encryption services, key management, and EF model configuration belong
  • skip it when the application has no encrypted persistence requirements

Dependency Direction

  • Depends on: no other MCA package
  • Typically referenced by: infrastructure projects
  • Can be used with: MCA apps or independently of the rest of MCA
  • Do not reference from: domain projects; encryption concerns should stay outside the domain model

Overview

  • Column-level encryption for EF Core.
  • AES and Data Protection implementations of IEncryptionService.
  • Value converters for encrypted properties.
  • Extensions to configure encryption on your model.

Usage

dotnet add package MinimalCleanArch.Security --version 0.1.18-preview

Recommended service registration:

builder.Services.AddDataProtectionEncryptionForDevelopment("YourApp");

Production-style registration:

builder.Services.AddEncryption(new EncryptionOptions
{
    Key = "YOUR_SECURE_AES_KEY"
});

Model configuration:

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    base.OnModelCreating(modelBuilder);
    modelBuilder.UseEncryption(encryptionService);
}

Recommended guidance:

  • use Data Protection-based encryption for new application development
  • use AddDataProtectionEncryptionForDevelopment(...) only for local development
  • use persistent key storage in production
  • use the hybrid Data Protection and AES support when migrating legacy encrypted data
  • keep encryption registration in infrastructure, not in domain or application layers

Key Components

  • EncryptedAttribute - Marks properties for encryption
  • IEncryptionService - Interface for encryption services
  • AesEncryptionService - AES implementation of IEncryptionService
  • EncryptedConverter - Value converter for encrypted properties
Product Compatible and additional computed target framework versions.
.NET 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
0.1.18-preview 0 3/12/2026
0.1.17 0 3/12/2026
0.1.17-preview 71 3/8/2026
0.1.16-preview 62 3/7/2026
0.1.15-preview 80 3/3/2026
0.1.14 92 3/2/2026
0.1.14-preview 82 3/1/2026
0.1.13-preview 83 2/28/2026
0.1.12-preview 109 2/22/2026
0.1.11-preview 102 12/27/2025
0.1.10-preview 88 12/27/2025
0.1.9-preview 126 12/21/2025
0.1.8-preview 224 12/15/2025
0.1.7 155 12/14/2025
0.1.7-preview 414 12/11/2025
0.1.6 439 12/9/2025
0.1.6-preview 474 12/9/2025
0.1.5 221 12/6/2025
0.1.4 219 5/26/2025
0.1.3 199 5/25/2025
Loading failed