Protecting sensitive data using the Data Protection API
There is no question that part of the ASP.NET Core secure coding technique should involve protecting your application's sensitive data at rest. Personally identifiable information (PII), data classified as confidential, and enumerable keys and IDs should be encrypted. ASP.NET Core made it easy for developers to achieve this by developing a data protection stack in its framework that provides a simplified API.
In this recipe, you will learn how to use the Data Protection API (DPAPI) to protect parts of your ASP.NET Core web application that expose sensitive data.
Getting ready
Using Visual Studio Code, open the sample Online Banking app folder at \Chapter01\data-protection\before\OnlineBankingApp
.
How to do it…
Let's take a look at the steps for this recipe:
- Launch Visual Studio Code and open the starting exercise folder by typing the following command:
code .
- Open the
Pages\Customers...