Recently I've faced an interesting requirement from one of my clients:
If you have to store login / password in a .config
file, it can't be stored in clear text. Moreover, if you think of encrypting this data in a .config
file, the encryption key can't be hardcoded in source code.
Sample config section with sensitive data:
<configSections>
<section name="PayUSettings" type="JobSystem.Payments.PayU.PayUSettings, JobSystem.Payments" />
</configSections>
<PayUSettings PosId="265898" Login="xxx" Password="yyy" IsTestMode="False" />
What are the possible solutions to fullfill this requirement?