MVC5Encrypt icon indicating copy to clipboard operation
MVC5Encrypt copied to clipboard

Encrypt / decrypt query string parameters with MVC 5

MVC5Encrypt

Encrypt / decrypt query string parameters with MVC 5

3 Steps to use :

  1. Install MVC5Encrypt from Nuget: Install-Package MVC5Encrypt

  2. 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 as first line in the view:

@using MVCEncrypt; )

  1. 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/