Safe.Secrets.Vault.On.Host.Directory 10.0.1

dotnet add package Safe.Secrets.Vault.On.Host.Directory --version 10.0.1
                    
NuGet\Install-Package Safe.Secrets.Vault.On.Host.Directory -Version 10.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Safe.Secrets.Vault.On.Host.Directory" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Safe.Secrets.Vault.On.Host.Directory" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Safe.Secrets.Vault.On.Host.Directory" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Safe.Secrets.Vault.On.Host.Directory --version 10.0.1
                    
#r "nuget: Safe.Secrets.Vault.On.Host.Directory, 10.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Safe.Secrets.Vault.On.Host.Directory@10.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Safe.Secrets.Vault.On.Host.Directory&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Safe.Secrets.Vault.On.Host.Directory&version=10.0.1
                    
Install as a Cake Tool

Safe Secrets Vault on Host Directory

Version License

The Safe Secrets Vault on Host Directory is a secure solution for storing secrets in an encrypted file using OpenSSL and RijndaelManaged techniques. It provides a reliable and convenient way to store and retrieve secrets from anywhere within your application.

Key Features

  • Strong encryption algorithms to ensure the security of secrets.
  • Easy integration with OpenSSL and RijndaelManaged techniques for file encryption.
  • Secrets are stored in an encrypted database for added protection.
  • Simple and efficient retrieval of secrets from any part of the application.
  • Comprehensive error handling and logging for easier troubleshooting.
  • Backward compatibility with previous versions for smooth upgrades.

Installation

You can install the Safe Secrets Vault on Host Directory package via NuGet by running the following command:

dotnet add package Safe.Secrets.Vault.On.Host.Directory --version 10.0.1

Usage

  1. Install the package using NuGet by following the installation instructions above.

  2. In your Program.cs file, add the following using statement at the top:

    using SafeSecretsVaultOnHostDirectory;
    
  3. Inside the Main method of your application, add the following lines at the beginning:

    string key = builder.Configuration["UserSecretsApiKey"];
    var config = Stremer.SafeSecrets(Assembly.GetExecutingAssembly(), builder.Configuration["UserSecretsApiKey"]);
    // Add an example code snippet here for illustration
    
  4. After that, you can retrieve secrets by using the following code:

    var _GetConnectionString = config["DefaultConnection"];
    

    This will retrieve the value of the DefaultConnection key from the secrets file in JSON format.

  5. Alternatively, you can inject the secrets into your application by adding the following code in your controller or class:

    public class Controller : Controller
    {
        private IConfiguration Configuration { get; }
    
        public Controller(IConfiguration configuration)
        {
            Configuration = configuration;
            Configuration = Stremer.DecryptSecrets(Configuration["SecretsApiKey"]);
            // other constructor logic...
        }
    
        public async Task<IActionResult> Index()
        {
            var UserAuthNSection = Configuration.GetSection("Authentication:User");
            // more code...
        }
    }
    

    This way, you can securely access the secrets within your controller or class.

For more details on how to use the Safe Secrets Vault on Host Directory, please refer to the Documentation.

Contributing

Contributions are welcome! Please see the Contributing Guide for more details.

License

This project is licensed under the Creative Commons Zero v1.0 Universal License. You are free

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
10.0.1 235 9/29/2025
7.0.5 332 5/12/2023

Release Notes - Version 10.0.1

 We are pleased to announce the release of version 10.0.1 of the "Safe Secrets Vault on Host Directory" package. This release includes several enhancements, bug fixes, and new features to improve the security and usability of the vault.

 Key Highlights:
 - Improved encryption algorithms for enhanced security.
 - Added support for OpenSSL and RijndaelManaged techniques for file encryption.
 - Enhanced database encryption to safeguard secrets.
 - Easy retrieval of secrets from anywhere within the application.
 - Improved error handling and logging for better troubleshooting.
 - Fixed compatibility issues with certain operating systems and frameworks.

 Please note that this version is backward compatible with previous versions. Upgrading to version 10.0.1 is recommended for all users to benefit from the latest security enhancements and features.

 For detailed information about the changes in this release, please refer to the documentation included with the package.

 We appreciate your continued support and feedback. If you encounter any issues or have suggestions for further improvements, please don't hesitate to reach out to us.

 Thank you for using the "Safe Secrets Vault on Host Directory" package!