DKNet.Svc.Encryption
10.1.8
See the version list below for details.
dotnet add package DKNet.Svc.Encryption --version 10.1.8
NuGet\Install-Package DKNet.Svc.Encryption -Version 10.1.8
<PackageReference Include="DKNet.Svc.Encryption" Version="10.1.8" />
<PackageVersion Include="DKNet.Svc.Encryption" Version="10.1.8" />
<PackageReference Include="DKNet.Svc.Encryption" />
paket add DKNet.Svc.Encryption --version 10.1.8
#r "nuget: DKNet.Svc.Encryption, 10.1.8"
#:package DKNet.Svc.Encryption@10.1.8
#addin nuget:?package=DKNet.Svc.Encryption&version=10.1.8
#tool nuget:?package=DKNet.Svc.Encryption&version=10.1.8
DKNet.Svc.Encryption
Standalone, explicitly-invoked cryptography toolkit: AES-GCM encryption, RSA encrypt/sign, HMAC and SHA hashing, and
Base64/Base64URL helpers, all operating on UTF-8 strings. For transparent EF Core column encryption instead, see
DKNet.EfCore.Encryption — a different package.
Features
IAesGcmEncryption— authenticated AES-256-GCM encryption with optional associated dataIRsaEncryption— RSA encrypt/decrypt (OAEP-SHA256) and sign/verify (PKCS1-SHA256), including public-key-only instancesIHmacHashing/IShaHashing— HMAC-SHA256/512 and SHA-256/512 compute + constant-time verifyBase64StringExtensions— Base64 and Base64URL encode/decode helpersIAesEncryption(AES-CBC) kept for migration only —[Obsolete], prefer AES-GCM
Installation
dotnet add package DKNet.Svc.Encryption
Quick Start
using DKNet.Svc.Encryption;
using DKNet.Svc.Encryption.Ciphers;
builder.Services.AddEncryptionServices(); // AES-GCM, HMAC, SHA (AddRsaEncryption(key) separately if needed)
public sealed class SecretStore(IAesGcmEncryption aesGcm)
{
public string Protect(string plainText) => aesGcm.EncryptString(plainText);
public string Reveal(string cipherPackage) => aesGcm.DecryptString(cipherPackage);
}
Migration — namespace changes in this release
Root types were grouped into concern folders; the namespace of each moved type now ends
with its folder name. This is an import-only source break: no type was renamed, removed,
resignatured, or had its behaviour changed — update the using line and you're done.
| Type | Old namespace | New namespace |
|---|---|---|
IAesEncryption/AesEncryption, IAesGcmEncryption/AesGcmEncryption, IRsaEncryption/RsaEncryption |
DKNet.Svc.Encryption |
DKNet.Svc.Encryption.Ciphers |
IHmacHashing/HmacHashing, IShaHashing/ShaHashing |
DKNet.Svc.Encryption |
DKNet.Svc.Encryption.Hashing |
EncryptionSetup (registration point) and Base64StringExtensions/Base65StringExtensions
(the Base64/Base64URL encoding helpers) stay at DKNet.Svc.Encryption.
Documentation
Full feature reference, configuration, and gotchas: https://github.com/baoduy/DKNet/blob/dev/docs/Services/DKNet.Svc.Encryption.md
| Product | Versions 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. |
-
net10.0
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 |
|---|---|---|
| 12.0.0 | 3 | 9/17/2026 |
| 11.0.0 | 20 | 9/17/2026 |
| 10.1.29 | 33 | 9/17/2026 |
| 10.1.28 | 31 | 9/17/2026 |
| 10.1.27 | 36 | 9/16/2026 |
| 10.1.26 | 37 | 9/16/2026 |
| 10.1.25 | 39 | 9/16/2026 |
| 10.1.24 | 83 | 9/11/2026 |
| 10.1.23 | 82 | 9/11/2026 |
| 10.1.22 | 79 | 9/11/2026 |
| 10.1.21 | 90 | 9/11/2026 |
| 10.1.20 | 92 | 9/9/2026 |
| 10.1.19 | 212 | 9/3/2026 |
| 10.1.18 | 85 | 9/3/2026 |
| 10.1.17 | 88 | 9/3/2026 |
| 10.1.16 | 99 | 9/3/2026 |
| 10.1.15 | 138 | 9/1/2026 |
| 10.1.14 | 84 | 9/1/2026 |
| 10.1.13 | 91 | 8/31/2026 |
| 10.1.8 | 90 | 8/21/2026 |