DBGang.Configuration.SecuredJson
2.0.0
See the version list below for details.
dotnet add package DBGang.Configuration.SecuredJson --version 2.0.0
NuGet\Install-Package DBGang.Configuration.SecuredJson -Version 2.0.0
<PackageReference Include="DBGang.Configuration.SecuredJson" Version="2.0.0" />
paket add DBGang.Configuration.SecuredJson --version 2.0.0
#r "nuget: DBGang.Configuration.SecuredJson, 2.0.0"
// Install DBGang.Configuration.SecuredJson as a Cake Addin
#addin nuget:?package=DBGang.Configuration.SecuredJson&version=2.0.0
// Install DBGang.Configuration.SecuredJson as a Cake Tool
#tool nuget:?package=DBGang.Configuration.SecuredJson&version=2.0.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 the 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 | Versions 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. |
-
.NETStandard 2.1
- Microsoft.Extensions.Configuration.FileExtensions (>= 3.1.9)
- Newtonsoft.Json (>= 12.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.