I would like to protect one key/value pair in my appSettings but not the others using something like I've previously done with the ProtectSection method as seen below.
var configurationSection = config.GetSection("appSettings");
configurationSection.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
Ideally I would like to do something like the following:
var configurationElement = config.GetSection("appSettings").GetElement("Protected");
configurationElement.ElementInformation.ProtectElement("DataProtectionConfigurationProvider");
Here is the example appSettings I would be operating on:
<configuration>
<appSettings>
<add key="Unprotected" value="ChangeMeFreely" />
<add key="Protected" value="########"/>
</appSettings>
</configuration>
I've been searching but haven't found a way to do this. Is this possible?