Now you need to use DataProtection APis :
Data Protection Data Stack ASP.NET Core provides a simple and easy-to-use cryptographic API that a developer can use to protect data, including key management and rotation.
DataProtection.
, , ASP.NET: <machineKey> ASP.NET
: ( IDataProtectionProvider), ( IDataProtector) CreateProtector, .
IDataProtectionProvider DI, .AddDataProtection:
public void ConfigureServices(IServiceCollection services)
{
services.AddDataProtection();
...
}