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:
var conn = $"{host}:{port}";
var redis = ConnectionMultiplexer.Connect(conn);
services.AddStackExchangeRedisCache(options =>
{
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?
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.
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.
So another question is - how to verify if the encryption works?
Please help me understand the basics, any examples are very appreciated.
