ProMilesV5.SharedEncryption
0.1.0
See the version list below for details.
Install-Package ProMilesV5.SharedEncryption -Version 0.1.0
dotnet add package ProMilesV5.SharedEncryption --version 0.1.0
<PackageReference Include="ProMilesV5.SharedEncryption" Version="0.1.0" />
paket add ProMilesV5.SharedEncryption --version 0.1.0
#r "nuget: ProMilesV5.SharedEncryption, 0.1.0"
// Install ProMilesV5.SharedEncryption as a Cake Addin
#addin nuget:?package=ProMilesV5.SharedEncryption&version=0.1.0
// Install ProMilesV5.SharedEncryption as a Cake Tool
#tool nuget:?package=ProMilesV5.SharedEncryption&version=0.1.0
ProMilesV5.SharedEncryption
C# Class Library (.NET 8) for field-level AES-256-GCM encryption/decryption, published as a NuGet package.
Purpose
Consumers call only Encrypt(string) / Decrypt(string). All crypto and key management are internal. Key version caching and rotation are handled inside the library.
Configuration
Read from environment variables only — no appsettings, no consumer configuration.
| Variable | Description |
|---|---|
KeyVaultUri |
Azure Key Vault URI |
KeyName |
Key name in Key Vault |
ManagedIdentityClientId |
User-Assigned Managed Identity client ID (optional) |
Authentication
DefaultAzureCredential → User-Assigned Managed Identity.
Ciphertext Format
Base64 blob: {keyVersion}:{iv}:{ciphertext}
Public API
IEncryptionService:Encrypt(string),Decrypt(string)only.- No Key Vault types exposed publicly.
Build
dotnet build
Usage (after package publish)
<PackageReference Include="ProMilesV5.SharedEncryption" Version="0.1.0" />
// Register and use IEncryptionService
var encrypted = await encryptionService.Encrypt(plaintext);
var decrypted = await encryptionService.Decrypt(encrypted);
Key Dependencies
Azure.Security.KeyVault.KeysAzure.IdentitySystem.Security.Cryptography(built-in)
Deployment
Environment variables are injected as Kubernetes Secrets by DevOps/IT. Consuming developers do not set or manage these values.
| Variable | Set By |
|---|---|
KeyVaultUri |
DevOps (K8s Secret) |
KeyName |
DevOps (K8s Secret) |
ManagedIdentityClientId |
DevOps (K8s Secret) |
Development
- Target: .NET 8.0
- Nullable and implicit usings enabled
License
© 2026 ProMiles Online. All rights reserved. Internal use only.
-
net8.0
- Azure.Identity (>= 1.13.0)
- Azure.Security.KeyVault.Keys (>= 4.8.0)
NuGet packages
This package is not used by any NuGet packages.