Why .NET Core Whhhhhyyyyy!
So all what i wanted is to encrypt and decrypt a string from on end to another using .NET Core 2 like why this is so hard why complicating something that was as easy as having the same machine key! what if i like to have my own JWT token generation API end point for any reason and guess what instead of sending the user password in the JSON body in plain text i would like to encrypt that based on a shared key that both client and server have it. should be easy, right?! the defult thing you will see when you Google .NET Core 2 Encryption / Decryption is the new Data Protection and IDataProtector interface. you will find a good example on how to use it. public void RunSample() { Console.Write("Enter input: "); string input = Console.ReadLine(); // protect the payload string protectedPayload = _protector.Protect(input); Console.WriteLine($"Protect returned: {protectedPayload}"); ...