title: ASP.NET Core - Storing encryption key to Redis
body: <p>I'm not very experienced with data protection mechanism, especially in .net core/Redis so I can't understand from the official doc what and how encryption key is taken to be stored in Redis:</p>
  
  <pre><code>var conn = $"{host}:{port}";
  var redis = ConnectionMultiplexer.Connect(conn);
  
  services.AddStackExchangeRedisCache(options =&gt;
          {
              options.Configuration = conn;
          });
  //here            
  services.AddDataProtection()
          .PersistKeysToRedis(Redis, "DataProtection-Keys"); //where is the VALUE for the KEY? Should it be saved to Redis manually before call this?
  </code></pre>
  
  <p>So I'm wondering what kind of key I can use(I don't have any, how to create one?), where to store it and how to specify in the configs where to take it from.</p>
  
  <p>When I run the app the record with key "DataProtection-Keys" added to Redis, but I don't know what the value is and if it's working at all.</p>
  
  <p>So another question is - how to verify if the encryption works?</p>
  
  <p>Please help me understand the basics, any examples are very appreciated.</p>