KNM.LicenseValidator 1.0.9
KNM License Validator
A lightweight, hybrid offline/online license validation library for .NET 9 applications with multilanguage support.
Features
- Hybrid Validation: Online-first with offline fallback
- Triple Security: RSA signatures + AES encryption + HMAC integrity
- Multilanguage: Built-in Italian and English support
- Lightweight: No database dependencies - bring your own data layer
- Flexible: Configurable validation modes and storage providers
- Custom License Format: Branded license files with Base32 encoding
Quick Start
Basic setup
builder.Services.AddKNMLicenseValidator(config =>
{
config.Mode = ValidationMode.Hybrid;
config.ApiBaseUrl = "https://api.yourcompany.com";
config.ApiKey = "your-api-key";
config.LicenseDirectory = "./Licenses";
});
Usage
public class MyService
{
private readonly ILicenseValidator _validator;
public MyService(ILicenseValidator validator)
{
_validator = validator;
}
public async Task<bool> ValidateAsync()
{
var result = await _validator.ValidateLicenseAsync();
return result.IsValid;
}
}
License
No packages depend on KNM.LicenseValidator.
.NET 9.0
- KNM.CryptoHelper (>= 1.0.7)
- Microsoft.EntityFrameworkCore (>= 9.0.10)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Http (>= 9.0.10)
- Microsoft.Extensions.Localization.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.10)
- System.Security.Cryptography.ProtectedData (>= 9.0.10)
- System.Text.Json (>= 9.0.10)