title: how to encrypt the json data and send using http method in android?
body: <p>i want to send my encrypted json data to server using post method in android. This is my code for sending json data. how to encrypt it?</p>
  
  <pre><code>public String Update(String userid,String uname)
  {
  String response = null; 
  ArrayList&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();           
  nameValuePairs.add(new BasicNameValuePair("user_id",userid));
  nameValuePairs.add(new BasicNameValuePair("status","update"));
  nameValuePairs.add(new BasicNameValuePair("user_name",uname));
  try
  {
  HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(URL+OPERATION_UPDATE_USERNAME);
  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));                 
  ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler();
  response= httpclient.execute(httppost,responseHandler);
  JSONObject jsonObj = new JSONObject(response);
  }
  catch(Exception e)
  {
  }     
  return response.trim();
  }
  </code></pre>