EncryptColumn.Core
1.0.0
dotnet add package EncryptColumn.Core --version 1.0.0
NuGet\Install-Package EncryptColumn.Core -Version 1.0.0
<PackageReference Include="EncryptColumn.Core" Version="1.0.0" />
paket add EncryptColumn.Core --version 1.0.0
#r "nuget: EncryptColumn.Core, 1.0.0"
// Install EncryptColumn.Core as a Cake Addin #addin nuget:?package=EncryptColumn.Core&version=1.0.0 // Install EncryptColumn.Core as a Cake Tool #tool nuget:?package=EncryptColumn.Core&version=1.0.0
EncryptColumn.Core
The source of the project is taken from NuGet Package , and because it's development did not continue, I decided to fix its problems for the new version of .NET Core and publish it here.
What is EncryptColumn.Core ?
You can store your data in encrypted form in your database with this package.
How to use?
Install "EncryptColumn.Core" package to your project.
Specify your encryption key in the constructor method of your DbContext class and create a instance from the encryption provider. For example, you can use this Encryption Key Generator to create an encrypted key.
private readonly IEncryptionProvider _provider;
public ExampleDbContext()
{
string key = "example_encrypt_key";
this._provider = new GenerateEncryptionProvider(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 Username { get; set; }
[EncryptColumn]
public string Password { get; set; }
}
Product | Versions 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. |
-
net6.0
- Microsoft.EntityFrameworkCore (>= 6.0.3)
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.0.0 | 1,798 | 4/10/2022 |