Posts

Showing posts from May, 2016

Request String Encryption in MVC 5

Image
Hi Guys, This time I had a requirement to Encrypt the request string parameters before passing them to the Controller's method. After referring this  solution , I made this solution I hope you like it. 1) SecurityHelper  public class SecurityHelper     {         public static string Encrypt(string plainText)         {             string key = "jdsg432387#";             byte[] EncryptKey = { };             byte[] IV = { 55, 34, 87, 64, 87, 195, 54, 21 };             EncryptKey = System.Text.Encoding.UTF8.GetBytes(key.Substring(0, 8));             DESCryptoServiceProvider des = new DESCryptoServiceProvider();             byte[] inputByte = Encoding.UTF8.GetBytes(plainText);             MemoryStream mStream ...