Encrypting and decrypting data
There are multiple encryption algorithms you can choose from in .NET Core. Some algorithms are implemented by the operating system and their names are suffixed with the
CryptoServiceProvider class, some are implemented entirely in .NET, some use symmetric keys, and some use asymmetric keys.
Choose AES for symmetric encryption and RSA for asymmetric encryption.
Encrypting symmetrically with AES
To make it easier to reuse your protection code in the future, we will create a static class named
Protector in its own class library.
Using Visual Studio 2017
In Visual Studio 2017, press Ctrl + Shift + N or navigate to File | New | Project....
In the New Project dialog, in the Installed | Templates list, expand ...