Closed stuturkington closed 2 years ago
Hi! Lets say you have the following key in your appsettings:
"Nested": {
"KeyToEncrypt": "encrypted1",
"ListOfValue": [
"value1",
"encyptedValue2"
]
}
If you now want to decrypt the second entry in the ListOfValue
array you need to specify it in the KeysToDecrypt
list like this: Nested:ListOfValue:1
.
This should work.
Nice project!
I encrypted 2 keys in my appsettings.
I think now it has to do with the JSON. Encrypt and decrypt work in the console program using: key Serilog.WriteTo[2].Args.connectionString. When I try and decrypt it on the fly it says key not found (i've also used : to separate the key values. Is there a way to list the keys in the Dictionary?
System.Collections.Generic.KeyNotFoundException: The given key 'Serilog.WriteTo[2].Args.connectionString' was not present in the dictionary.