JHashEncryption.Security 1.1.1.1

dotnet add package JHashEncryption.Security --version 1.1.1.1
                    
NuGet\Install-Package JHashEncryption.Security -Version 1.1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JHashEncryption.Security" Version="1.1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JHashEncryption.Security" Version="1.1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="JHashEncryption.Security" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JHashEncryption.Security --version 1.1.1.1
                    
#r "nuget: JHashEncryption.Security, 1.1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JHashEncryption.Security@1.1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JHashEncryption.Security&version=1.1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=JHashEncryption.Security&version=1.1.1.1
                    
Install as a Cake Tool

๐Ÿ“ฆ JHashEncryption.Security

Secure your .NET microservices with RSA-OAEP-SHA256 encryption and Argon2id hashing โ€” built for performance, reliability, and middleware integration.


๐Ÿ” Overview

JHashEncryption.Security is a lightweight, production-ready NuGet package that provides:

  • โœ… RSA-OAEP-SHA256 encryption/decryption for secure payload handling
  • โœ… Argon2id password hashing for modern authentication flows
  • โœ… Plug-and-play middleware for automatic request/response encryption
  • โœ… Direct service injection for manual control in business logic

Built for .NET 10+, this package is ideal for developers building secure APIs, microservices, and cloud-native apps.


๐Ÿš€ Installation

dotnet add package JHashEncryption.Security

โš™๏ธ Setup

1. Register Services

builder.Services.AddJHashEncryption(publicKeyPem, privateKeyPem);

2. Enable Middleware

app.UseJHashEncryption();

You can use the middleware and/or inject services directly into your controllers or services.

๐Ÿงช Usage Examples

1. Dependency Injection (Ideal for microservices)

private readonly RsaOaepSha256Crypto _crypto;
private readonly Argon2Hasher _hasher;

public Class_Name(RsaOaepSha256Crypto crypto, Argon2Hasher hasher)
{
    _crypto = crypto;
    _hasher = hasher;
}

๐Ÿ”น Encrypt/Decrypt Payloads

var encrypted = _crypto.Encrypt("sensitive data");
var decrypted = _crypto.Decrypt(encrypted);

๐Ÿ”น Hash and Verify Passwords

var hash = _hasher.HashPassword("myPassword");
var isValid = _hasher.VerifyPassword("myPassword", hash);

2. Manual Usage (No DI)

๐Ÿ”น Encrypt/Decrypt Payloads

var crypto = new RsaOaepSha256Crypto(publicKeyPem, privateKeyPem);
var encrypted = crypto.Encrypt("sensitive data");
var decrypted = crypto.Decrypt(encrypted);

๐Ÿ”น Hash and Verify Passwords

var hasher = new Argon2Hasher();
var hash = hasher.HashPassword("myPassword");

๐Ÿงฐ API Surface

Service Description
RsaOaepSha256Crypto Encrypts and decrypts strings using RSA-OAEP padding with SHA-256
Argon2Hasher Hashes and verifies passwords using Argon2id
JHashEncryptionMiddleware ASP.NET Core middleware for automatic request/response encryption

๐Ÿ›ก๏ธ Why JHashEncryption?

  • ๐Ÿ”’ Modern cryptography: RSA-OAEP-SHA256 + Argon2id = secure by default
  • โšก Minimal overhead: optimized for performance in microservices
  • ๐Ÿงฉ Flexible architecture: use as middleware or inject directly
  • ๐Ÿง  Built by a systems thinker: designed for reliability, clarity, and maintainability

๐Ÿ“„ License

MIT โ€” free to use, modify, and distribute.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1.1.1 142 11/15/2025