GithubHelp home page GithubHelp logo

joaootaviofarias / entityframeworkcore.encryptcolumn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emrekizildas/entityframeworkcore.encryptcolumn

0.0 0.0 0.0 28 KB

Encrypt & Decrypt your databases columns using EntityFramework Core.

License: MIT License

C# 100.00%

entityframeworkcore.encryptcolumn's Introduction

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 [email protected] for your problems related to the project. You can also create an issue in repository.

entityframeworkcore.encryptcolumn's People

Contributors

emrekizildas avatar svidem avatar osaleem303 avatar sametkahraman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.