title: MD5 encoded parameter in URL
body: <p>I am using following code to encrypt my email id in Java and sending it as a parameter in url (Using URLEncoder.encode(encrypteInput("email"))): </p>
  
  <pre><code>public static String encrypteInput(String input) {
          String output = null;
          input = input + ((int) Math.random()) % 1000;
          try {
              MessageDigest md5 = MessageDigest.getInstance("MD5");
              output = new String(md5.digest(input.getBytes()));
          } catch (Exception e) {
              output = "";
          }
          return output;
  }
  </code></pre>
  
  <p>but, when I am getting the same parameter from servlet, it is not giving me the same output as encrypteInput("email").</p>