https://github.com/furkandeveloper/entityframeworkcore.dataencryption
This package is a plugin that adds data encryption support to EF Core.
https://github.com/furkandeveloper/entityframeworkcore.dataencryption
data-encryption ef-core encryption entity-framework-core
Last synced: 9 months ago
JSON representation
This package is a plugin that adds data encryption support to EF Core.
- Host: GitHub
- URL: https://github.com/furkandeveloper/entityframeworkcore.dataencryption
- Owner: furkandeveloper
- License: mit
- Created: 2022-05-09T13:25:40.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-31T08:02:07.000Z (almost 4 years ago)
- Last Synced: 2025-03-19T02:59:02.240Z (about 1 year ago)
- Topics: data-encryption, ef-core, encryption, entity-framework-core
- Language: C#
- Homepage:
- Size: 74.2 KB
- Stars: 22
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
***
## Give a Star 🌟
If you liked the project or if **EntityFrameworkCore.DataEncryption** helped you, please give a star.
***
### Purpose
**EntityFrameworkCore.DataEncryption** with the entity framework core value converter feature, it allows you to store your data by encrypting it.
***
### Summary
```
Install-Package EntityFrameworkCore.DataEncryption.Conversions
```
Then mark the columns to be encrypted in DbContext.
```csharp
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity(entity =>
{
entity
.Property(p => p.Id)
.UseIdentityColumn();
entity
.Property(p => p.Name)
.IsRequired()
.HasMaxLength(2048);
entity
.Property(p => p.Surname)
.IsRequired()
.HasMaxLength(2048);
entity
.Property(p => p.Phone)
.IsRequired()
.HasConversion(new EncryptValueConverter(key:"89acMXSBpuEBDWHZ"));
});
base.OnModelCreating(modelBuilder);
}
```
***
### Documentation
Visit wiki documentation. [Wiki](https://github.com/furkandeveloper/EntityFrameworkCore.DataEncryption/wiki)
***
### Sample Project
See for more information visit [sample project](https://github.com/furkandeveloper/EntityFrameworkCore.DataEncryption/tree/master/sample/EntityFrameworkCore.DataEncryption.Sample)