Skip to content
sunmeatPublic

About

Your secrets. Your rules. A .NET toolkit for cryptography and secure secret storage.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

1 star

Watchers

0 watching

Forks

Sunmeat.Vault logo

Sunmeat.Vault

Your secrets. Your rules.

A .NET library for cryptography and secure secret storage.

NuGet CI MIT .NET Support development

Українська

Installation

dotnet add package Sunmeat.Vault --version 1.0.0

Quick start

using 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);
}

API

  • Vault.Encrypt and Vault.Decrypt support AES-256-GCM, ChaCha20-Poly1305, and associated authenticated data.
  • EncryptWithPassword and DecryptWithPassword default to PBKDF2-HMAC-SHA-256, with opt-in Argon2id and PBKDF2-HMAC-SHA-512.
  • Vault.Password.Hash uses Argon2id. Verify indicates whether a verified PBKDF2 hash needs migration.
  • Vault.Hash, Vault.Kdf, and Vault.Signatures provide SHA-2, HMAC-SHA-256, HKDF-SHA-256, RSA-PSS, and ECDSA.
  • Vault.Hybrid protects payloads with an ephemeral AES key wrapped using RSA-OAEP-SHA-256.
  • Vault.Files encrypts files up to 32 MiB and replaces the destination after authentication.
  • Vault.OpenAsync opens a local store. Call SaveAsync to persist changes. Password changes and data-key rotation have separate operations.

Losing the master password or key can make encrypted data inaccessible.

Threat model and file formats

Sunmeat ecosystem

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


❤️ Support the project

Support development Patreon Monobank Star on GitHub Developer website


Built with curiosity. Shared with the community.

Copyright © 2026 Oleksandr Zahoruiko · sunmeat.dev

About

Your secrets. Your rules. A .NET toolkit for cryptography and secure secret storage.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages