Encrypt / decrypt query string parameters with MVC 5
3 Steps to use :
-
Install MVC5Encrypt from Nuget: Install-Package MVC5Encrypt
-
Modify
<a href='@Url.Action("TestEncrypt", new {id=7, a = 1, b = "asd" })'>Test</a>
into
<a href='@Url.ActionEnc("mySecret", "TestEncrypt", new {id=7, a = 1, b = "asd" })'>Test</a>
- Add to the action the MVCDecryptFilterAttribute
[MVCDecryptFilter(secret = "mySecret")]
Demo at http://mvc5encrypt.apphb.com/
NuGet at https://www.nuget.org/packages/MVC5Encrypt/
Sources on GitHub : https://github.com/ignatandrei/MVC5Encrypt
More details at Wiki https://github.com/ignatandrei/MVC5Encrypt/wiki
Video at https://youtu.be/FA-sTM6cf5w
Contact at my blog http://msprogrammer.serviciipeweb.ro/2017/03/20/mvc-5-encrypt-parameters/