O'Reilly logo

Mastering ASP.NET Web API by Malendra Hurbuns, Mithun Pattankar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data Protection API

ASP.NET Core uses Microsoft.AspNetCore.DataProtection to handle the encryption keys used to protect state values that get posted between the app and the client.

The Machine.config keys are no longer used for data protection in ASP.NET Core. Data Protection is quite an extensive topic; you can refer to the Microsoft documentation (https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/) to know more about this.

The Cookie generation takes places using Data Protection APIs.

We will take a simple example of encrypting the ID values for a given entity.

Consider the BudgetCategory class having various properties that are uniquely identified by the ID. When we retrieve a list of budget categories or single objects, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required