title: How do you encrypt a password within appsettings.json for ASP.net Core 2?
body: <p>I'd like to use my appsettings.json to store a "master password". </p>
  
  <p>This master password would then be used to open up a private key (and its subsequent password store) generated by this excellent password store package: <a href="https://github.com/neosmart/SecureStore" rel="noreferrer">https://github.com/neosmart/SecureStore</a></p>
  
  <p>The problem is, I can't think of any way to encrypt the master password. I know in .NET 4.5, it was possible to do the following:</p>
  
  <p>1) Place your password into the web.config file</p>
  
  <p>2) Run this script: aspnet_regiis.exe -pef appSettings "C:\myfolder"</p>
  
  <p>3) Your password would end up being encrypted - but read securely by your program.</p>
  
  <p><a href="https://www.codeproject.com/Articles/599416/Encrypting-ASP-NET-Application-Settings" rel="noreferrer">https://www.codeproject.com/Articles/599416/Encrypting-ASP-NET-Application-Settings</a></p>
  
  <p>Am I going about this the right way or is there a better practice?</p>