title: How to encrypt/decrypt URL parameters in javascript?
body: <p>Before anyone jumps in and says, "Oh!! that's a bad idea", I know it is.</p>
  
  <p>I want to keep both the key and value in the query string to be not easily visible to the end user.
  I have something like this <code>google.com/?category=textile&amp;user=user1</code>
  I need to make it unintelligible like this: <code>google.com/?kasjdhfkashasdfsf32423</code></p>
  
  <p>Is there any way to achieve this in javascript. I have already seen this </p>
  
  <p>I have already seen <a href="https://stackoverflow.com/questions/332872/how-to-encode-a-url-in-javascript">this</a> 
  and <a href="http://forums.asp.net/t/1772334.aspx" rel="noreferrer">this</a>.</p>
  
  <p>but I don't think encoding will solve the problem. Also, this code is entirely in client side. I know that it is not secure but I just need this is a naive, weak defense. 
  Please help.</p>
  
  <h2>Edit</h2>
  
  <p>I apologize if my question was not clear earlier.</p>
  
  <p>The URL <code>google.com/?category=textile&amp;user=user1</code> is being passed on from a different application.</p>
  
  <p>The values passed in the query string directly controls what is being displayed to the user. As is, anyone with no technical knowledge can easily change the value and view the data corresponding to a different category or user. I need to make this unintelligible so that it is not obvious. If a user is a techie and figures out the encryption used, then it is fine. I need a stop-gap solution till we have a better architecture in place</p>