Your secrets. Your rules.
A .NET library for cryptography and secure secret storage.
dotnet add package Sunmeat.Vault --version 1.0.0using Sunmeat.Vault;
using var key = Vault.Keys.Generate();
var encrypted = Vault.Encrypt("Hello, world!", key);
Console.WriteLine(Vault.Decrypt(encrypted, key));
var folder = Directory.CreateTempSubdirectory();
try
{
var path = Path.Combine(folder.FullName, "secrets.vault");
var masterPassword = Vault.Random.Password(32);
await using var store = await Vault.OpenAsync(path, masterPassword);
await store.SetAsync("Example", 42);
await store.SaveAsync();
Console.WriteLine(await store.GetAsync<int>("Example"));
}
finally
{
folder.Delete(recursive: true);
}Vault.EncryptandVault.Decryptsupport AES-256-GCM, ChaCha20-Poly1305, and associated authenticated data.EncryptWithPasswordandDecryptWithPassworddefault to PBKDF2-HMAC-SHA-256, with opt-in Argon2id and PBKDF2-HMAC-SHA-512.Vault.Password.Hashuses Argon2id.Verifyindicates whether a verified PBKDF2 hash needs migration.Vault.Hash,Vault.Kdf, andVault.Signaturesprovide SHA-2, HMAC-SHA-256, HKDF-SHA-256, RSA-PSS, and ECDSA.Vault.Hybridprotects payloads with an ephemeral AES key wrapped using RSA-OAEP-SHA-256.Vault.Filesencrypts files up to 32 MiB and replaces the destination after authentication.Vault.OpenAsyncopens a local store. CallSaveAsyncto persist changes. Password changes and data-key rotation have separate operations.
Losing the master password or key can make encrypted data inaccessible.
Independent .NET libraries with a shared philosophy: simple APIs, modularity and open source.
| Library | Purpose | NuGet / Status |
|---|---|---|
| Sunmeat.Prism | Serialization and format conversion | NuGet |
| Sunmeat.Pulse | Structured logging | NuGet |
| Sunmeat.Nexus | HTTP requests and API communication | NuGet |
| Sunmeat.Lens | Code analysis and architecture visualization | NuGet · Roslyn · Raster |
| Sunmeat.Guard | Validation and argument checks | NuGet |
| Sunmeat.Diff | Data comparison and patches | NuGet |
| Sunmeat.Morph | Object mapping and transformation | NuGet |
| Sunmeat.Forge | Synthetic data and test fixtures | NuGet |
| Sunmeat.Signal | Multichannel notifications | NuGet · Extensions.DependencyInjection |
| Sunmeat.Vault (this project) | Cryptography and secret storage | NuGet |
| Sunmeat.Portal | File systems, storage and backups | NuGet |
| Sunmeat.Scribe | Document generation and processing | In development |
| Sunmeat.Flux | In-process Mediator, CQRS and Event Bus | In development |
| Sunmeat.Synapse | Unified AI API and model routing | In development |
All published packages · Ecosystem website
Built with curiosity. Shared with the community.
Copyright © 2026 Oleksandr Zahoruiko · sunmeat.dev
