title: Encrypt data passed in View Model
body: <p>I have a simple post method in a MVC controller that checks whether the ModelState is valid then calls another method passing an instance of the model as a paramter. This model contains sensitive data that is easily obtained by looking at Fiddler. My goal is to somehow mask or encrypt this data so that it cannot be seen in an http trace.</p>
  
  <p>I have seen posts suggesting to use Session or Temp variables but that is not an option in my case.</p>
  
  <p>This is what the code looks like:</p>
  
  <pre><code>[HttpPost]
  [ActionName("Search")]
  [AccessControl(Xri)]
  public ActionResult SearchPost(string string1, ViewModel model)
  {
          model.NoResults = false;    
  
          if (ModelState.IsValid)
          {
  
             if (ModelState.IsValid) return RedirectToAction("TargetAction", model);            
           }
  
  }
  
  [AccessControl(Xri)]
  public ActionResult TargetAction(string arg, ViewModel viewModel)
  {
   .
   .
   .
  }
  </code></pre>
  
  <p>Fiddler shows the following:</p>
  
  <p>/TargetAction?id=01010101&amp;date=08%2F14%2F2013%2000%3A00%3A00&amp;To=08%2F21%2F2013%2000%3A00%3A00&amp;param1=somevalue&amp;param2=somevalue2</p>
  
  <p>Is there a way to mask the url parameters shown here?</p>