EncryptedConfigValue.Net.Module 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package EncryptedConfigValue.Net.Module --version 1.0.3                
NuGet\Install-Package EncryptedConfigValue.Net.Module -Version 1.0.3                
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="EncryptedConfigValue.Net.Module" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EncryptedConfigValue.Net.Module --version 1.0.3                
#r "nuget: EncryptedConfigValue.Net.Module, 1.0.3"                
#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.
// Install EncryptedConfigValue.Net.Module as a Cake Addin
#addin nuget:?package=EncryptedConfigValue.Net.Module&version=1.0.3

// Install EncryptedConfigValue.Net.Module as a Cake Tool
#tool nuget:?package=EncryptedConfigValue.Net.Module&version=1.0.3                

EncryptedConfigValue.NET

tests

In sync with encrypted-config-value v5.2.0 (a104ddefd48e2fb322f5db205f7c93f0ad4ae1d7)

EncryptedConfigValue.NET is a .NET implementation of the Palantir's encrypted-config-value library.

This repository provides tooling for encrypting certain configuration parameter values in ASP.NET Core apps. This defends against accidental leaks of sensitive information such as copy/pasting a config file.

EncryptedConfigValue.AspNetCore

A EncryptedConfigValue.AspNetCore package provides a way of using encrypted values in your ASP.NET Core appsettings.json files.

Currently supported algorithms:

  • AES: (AES/GCM/NoPadding) with random IV
  • RSA

Install from NuGet:

Install-Package EncryptedConfigValue.Net.AspNetCore  

To use in your app:

// If needed, set environment variable, default is var/conf/encrypted-config-value.key
my-application$ export encrypted_config_value.config.key_path=conf/encrypted-config-value.key 
// appsettings.json
{
  "Encrypted": "${enc:INNv4cGkVF45MLWZhgVZdIsgQ4zKvbMoJ978Es3MIKgrtz5eeTuOCLM1vPbQm97ejz2EK6M=}",
}
// Program.cs
using EncryptedConfigValue.AspNetCore;
using EncryptedConfigValue.Crypto;

// Optionally you can set environment variable in application
// Environment.SetEnvironmentVariable(KeyFileUtils.KeyPathProperty, "conf/encrypted-config-value.key");

var builder = WebApplication.CreateBuilder(args).AddEncryptedConfigValueProvider();

EncryptedConfigValue.Cli

A EncryptedConfigValue.Cli project provides CLI tools for generating keys and encrypting values.

The CLI tool provides following commands:

  • encrypt-config-value [-v <value>] [-k <keyfile>] for encrypting values. In the case of non-symmetric algorithms (e.g. RSA) specify the public key. If -v <value> not provided, program will explicitly ask about value by running interactive mode. On Windows OS it is recommended to provide keyfile parameter as default path points to var\conf\encrypted-config-value.key.
  • generate-random-key -a <algorithm> [-f <keyfile>] for generating random keys with the specified algorithm. In the case of non-symmetric algorithms (e.g. RSA) the private key will have a .private extension. On Windows OS it is recommended to provide keyfile parameter as default path points to var\conf\encrypted-config-value.key.

Currently supported algorithms:

  • AES: (AES/GCM/NoPadding) with random IV
  • RSA

Install from NuGet:

dotnet tool install -g EncryptedConfigValue.Net.Cli

To generate keys:

my-application$ encrypted-config-value-dotnet generate-random-key -a AES
Wrote key to var/conf/encrypted-config-value.key

To encrypt value:

my-application$ encrypted-config-value-dotnet encrypt-config-value -v "secret-value"
enc:eyJUeXBlIjoiQUVTIiwiRW5jcnlwdGlvbk1vZGUiOjAsIkl2IjoiUFZkMDJqbkczQ2FCS2t4MyIsIkNpcGhlclRleHQiOiJMSXMraHNuU0dZUXVVWmc9IiwiVGFnIjoiLzRVeVN0ckpnNjRacGJUdGJRTWEzZz09In0=

EncryptedConfigValue.Module

You can use EncryptedConfigValue.Module to create your own decrypt provider.

Install from NuGet:

Install-Package EncryptedConfigValue.Net.Module

Note

The project has been devised to align with the original functionality. Please refrain from suggesting changes that would alter how it works compared to the original. Any adjustments, additions, or removals should be carefully considered to ensure they align seamlessly with the established framework.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EncryptedConfigValue.Net.Module:

Package Downloads
EncryptedConfigValue.Net.AspNetCore

Provides a way of using encrypted values in ASP.NET Core apps.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.7 260 10/12/2024
1.1.6 282 9/22/2024
1.1.0 580 4/27/2024
1.0.7 201 4/26/2024
1.0.6 143 4/24/2024
1.0.5 150 4/21/2024
1.0.4 138 4/21/2024
1.0.3 157 3/23/2024
1.0.2 121 3/7/2024