Skip to content

Bukalemun 🦎 – Flexible and Secure Data Encryption Library for .NET Bukalemun is a lightweight and flexible encryption library for .NET applications, designed to securely store sensitive and personal data in databases.

License

Notifications You must be signed in to change notification settings

xreeple/bukalemun

Repository files navigation

Bukalemun

Unit Tests

Bukalemun 🦎 – Flexible and Secure Data Encryption Library for .NET Bukalemun is a lightweight and flexible encryption library for .NET applications, designed to securely store sensitive and personal data in databases.

It was built to enhance data privacy and help comply with regulations such as GDPR and KVKK. With real-time encryption/decryption operations, it offers an ideal balance between performance and security.

πŸ“¦ Packages

Package Release Preview Downloads
Xreeple.Bukalemun NuGet NuGet NuGet
Xreeple.Bukalemun.Data NuGet NuGet NuGet
Xreeple.Bukalemun.Postgresql NuGet NuGet NuGet
Xreeple.Bukalemun.Providers NuGet NuGet NuGet
Xreeple.Bukalemun.Services NuGet NuGet NuGet
Xreeple.Bukalemun.DependencyInjectionExtensions NuGet NuGet NuGet
Xreeple.Bukalemun.Masking NuGet NuGet NuGet

πŸš€ Features

  • AES-based symmetric encryption support
  • Customizable encryption algorithms
  • Column-level encryption (e.g., name, surname, email, etc.)
  • Masked data presentation support (e.g., ****4567)
  • Minimal integration via attribute-based usage
  • Extendable key management system

🎯 Target Use Cases

  • Encrypting personal data (e.g., name, national ID, phone number, email, etc.)
  • Enhancing data security at the application layer
  • Providing masked data to minimize data leakage risk

πŸ’Ύ Install

The Xreeple.Bukalemun.DependencyInjectionExtensions library also provides other packages. Therefore, to get started, simply add the Xreeple.Bukalemun.DependencyInjectionExtensions library to your project.

dotnet add package Xreeple.Bukalemun.DependencyInjectionExtensions

Use PostgreSQL

Currently, only PostgreSQL databases are supported. If you are using PostgreSQL, you should install this package.

dotnet add package Xreeple.Bukalemun.Postgresql

Quick Start

The IServiceCollection extension should be used for dependency management.

using Xreeple.Bukalemun.DependencyInjectionExtensions.Extensions;

builder.Services.AddBukalemun(builder.Configuration);

With PostgreSQL

The UseNpgsql extension must be used for PostgreSQL. The default schema is the "public" schema. The default Connection String key is the "DefaultConnection" key. You can specify the schema using the "schema" parameter.

using Xreeple.Bukalemun.DependencyInjectionExtensions.Extensions;

builder.Services.AddBukalemun(builder.Configuration).UseNpgsql();

Configurations

The "Store" definition is mandatory in the configuration section. At least one store must be defined. Store definitions can be made as needed.

{
  "ConnectionStrings": {
    "DefaultConnection": ""
  },
  "Bukalemun": {
    "Stores": {
      "Default": {
        "EncryptKey": ""
      }
    }
  }
}

Simple usage

IBukalemun is available through DI.

private readonly IBukalemun _bukalemun;

await _bukalemun.CamouflageAsync("Store", "Table", "Key", "Column", "Value");

Transactional usage

TransactionScope can be used for transactional use.

using (var scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
{
    await bukalemun.CamouflageAsync("Store", "Table", "Key", "Column", "Value");

    // Other transactions
    // ...

    scope.Complete();
}

πŸ“„ License

MIT License

About

Bukalemun 🦎 – Flexible and Secure Data Encryption Library for .NET Bukalemun is a lightweight and flexible encryption library for .NET applications, designed to securely store sensitive and personal data in databases.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages