DBGang.Configuration.SecuredJson 2.1.0

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

// Install DBGang.Configuration.SecuredJson as a Cake Tool
#tool nuget:?package=DBGang.Configuration.SecuredJson&version=2.1.0

Secure your sensitive data in JSON file for your .NET applications.

This is a direct extension to Microsoft.Extensions.Configuration.Json. It adds feature to protect sensitive data in JSON configuration file.

The previous version (https://www.nuget.org/packages/DBGang.Configuration.SecuredJson/1.1.2) doesn't work well with array and complex types in JSON file. This update fixes the issue.

To encrypt a particular property, add UNENCRYPTED:: as prefix to the property name, like UNENCRYPTED::myStringKey. Note that all letters in UNENCRYPTED:: are capital case followed by two colons. After the json file was initially loaded, properties prefixed with this special mark would be encrypted. The prefix was changed from UNENCRYPTED:: to ENCRYPTED:: to indicate the corresponding value field has been encrypted. Below shows how a json file looks like before and after initial load:

{
  "ObjKey": {
    "UNENCRYPTED::SubStringKey1": "SubStringValue1",
    "SubIntegerKey2": 20,
    "UNENCRYPTED::SubBooleanKey3": true,
    "UNENCRYPTED::SubArray1": [
      "SubItem1",
      "SubItem2",
      "SubItem3"
    ]
  },
  "UNENCRYPTED::ArrayKey": [
    "Item1",
    "Item2",
    "Item3"
  ],
  "UNENCRYPTED::StringKey1": "StringValue1",
  "IntegerKey2": 2,
  "BooleanKey3": false,
  "UNENCRYPTED:ConnectionStrings": {
    "MyDB": "Server=myServer;Database=myDatabase;User Id=myUserId;Password=myPassword;"
  }
}
{
  "ObjKey": {
    "ENCRYPTED::SubStringKey1": "hRXkhRhm1yeUO4YCAeQ6sKiOGwrDC1Lj3pFDk7kEYDw=",
    "SubIntegerKey2": 20,
    "ENCRYPTED::SubBooleanKey3": "UIQ2ZjWN+2TFmW0xCEoxXQ==",
    "ENCRYPTED::SubArray1": "17cAy+xiWZraHtApkmq1q69xHcmL5mAiTYm78dAbc5Gig9b3mK2ngQSqKMxvbr+IcAwz2Xptk0wrj/xXXoqZfw=="
  },
  "ENCRYPTED::ArrayKey": "z96OFCk16fH/Cx5lX3JSAB+UZX+mJCuhA4I0lFFZc6nB352OBd79Q9FUSH6NCb0W",
  "ENCRYPTED::StringKey1": "5SPhANlc4qeIOK0bCWoCjj4M+fcQes9N+3sw6EHsKQY=",
  "IntegerKey2": 2,
  "BooleanKey3": false,
  "ENCRYPTED::ConnectionStrings": "Ej/NOYEk8Yyl29h8AahkJ9/pbuFALcLLvIXy4UqTi3QUJlSEwsK2kyc5iZBgvpJkUzU7M4OhBVJMFvrXE+KbdcR2hPzNsy8WXv3LFsm06FNT3rRyz+pdoDukkd+BiZ5idXdFDyoJHg+Gga3msJ6fiw=="
}

Please note WRITE permission is required for your app to update the json file.

Please take a look at the test project to see how to use it.

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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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

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
2.1.1 104 9/19/2023
2.1.0 418 2/18/2022
2.0.0 402 11/2/2020
1.1.2 506 7/15/2019
1.1.1 731 7/14/2019
1.1.0 962 7/13/2019
1.0.0 1,242 7/11/2019