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.
- 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
- 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
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.DependencyInjectionExtensionsCurrently, only PostgreSQL databases are supported. If you are using PostgreSQL, you should install this package.
dotnet add package Xreeple.Bukalemun.PostgresqlThe IServiceCollection extension should be used for dependency management.
using Xreeple.Bukalemun.DependencyInjectionExtensions.Extensions;
builder.Services.AddBukalemun(builder.Configuration);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();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": ""
}
}
}
}IBukalemun is available through DI.
private readonly IBukalemun _bukalemun;
await _bukalemun.CamouflageAsync("Store", "Table", "Key", "Column", "Value");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();
}MIT License