EntityFrameworkCore.EncryptColumn 6.0.8

dotnet add package EntityFrameworkCore.EncryptColumn --version 6.0.8                
NuGet\Install-Package EntityFrameworkCore.EncryptColumn -Version 6.0.8                
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="EntityFrameworkCore.EncryptColumn" Version="6.0.8" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EntityFrameworkCore.EncryptColumn --version 6.0.8                
#r "nuget: EntityFrameworkCore.EncryptColumn, 6.0.8"                
#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.
// Install EntityFrameworkCore.EncryptColumn as a Cake Addin
#addin nuget:?package=EntityFrameworkCore.EncryptColumn&version=6.0.8

// Install EntityFrameworkCore.EncryptColumn as a Cake Tool
#tool nuget:?package=EntityFrameworkCore.EncryptColumn&version=6.0.8                

EntityFrameworkCore.EncryptColumn

Hello, you can store your data in encrypted form in your database with this package.

How to use?

Install "EntityFrameworkCore.EncryptColumn" package to your project.

Specify your encryption key in the constructor method of your DbContext class and create a instance from the encryption provider. Yout encryption key must be 128 bit!

private readonly IEncryptionProvider _provider;
public ExampleDbContext()
{
    this._provider = new GenerateEncryptionProvider("example_encrypt_key");
}

Then specify that you will use an encryption provider in the "OnModelCreating" method.

modelBuilder.UseEncryption(this._provider);

That's it! Now you can encrypt the parameters in the class you want by adding the "EncryptColumn" attribute.

public class User
{
    public Guid ID { get; set; }
    public string Firstname { get; set; }
    public string Lastname { get; set; }
    [EncryptColumn]
    public string EmailAddress { get; set; }
    [EncryptColumn]
    public string IdentityNumber { get; set; }
}

You can take a look at the example project here.

Contact

You can send an e-mail to kizildas@icloud.com for your problems related to the project. You can also create an issue in repository.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on EntityFrameworkCore.EncryptColumn:

Package Downloads
OnlineSales

Package Description

Expero.Helpers

Helpers package for expero

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.0.8 336,660 8/18/2022
6.0.6 10,639 6/20/2022
5.0.6 11,088 5/30/2021
3.1.0 45,975 5/30/2021
1.0.0 4,668 4/25/2021