title: Generate MD5 hash in Java -Output 16 character
body: <p>I have created MD5 hash.Its working fine now.I want output in 16 character.Current Code is returning 32 characters.</p>
  
  <p>This is my code:</p>
  
  <pre><code>    try {
              String text = "Hello World";
              MessageDigest msg = MessageDigest.getInstance("MD5");
              msg.update(text.getBytes(), 0, text.length());
              String digest1 = new BigInteger(1, msg.digest()).toString(16);
              System.out.println("MD5: " + digest1.length());
              System.out.println("MD5: " + digest1);
          } catch (NoSuchAlgorithmException ex) {
              Logger.getLogger(AndroidActivationView.class.getName()).log(Level.SEVERE, null, ex);
          }
  </code></pre>
  
  <p>Where I want to change it.</p>
  
  <p>How can i get the 16 character output.?</p>
  
  <p>Thanks in advance;</p>