title: IOptions and it's security ASP NET Core
body: <p>On app startup I have to provide symmetric key which will be used e.g. in controllers. I've heard that singleton isn't enough safe to keeping secrets, so I'm wondering about <code>IOptions</code> from <code>Microsoft.Extensions.Options</code>. Is <code>IOptions</code> pattern safe? Or maybe there are better alternatives for this purpose?
  Currently, it looks like this:</p>
  <p>Startup.cs</p>
  <pre><code>services.Configure&lt;EncryptingOptions&gt;(cfg =&gt;
  {
      cfg.SymmetricKey = symmetricKey;
  });
  </code></pre>
  <p>E.g. controller:</p>
  <pre><code>    private readonly EncryptingOptions _encryptingOptions;
      
      public SomeController(IOptions&lt;EncryptingOptions&gt; encryptingOptions)
      {
          _encryptingOptions = encryptingOptions.Value;
      }
  </code></pre>