title: MD5 format in Java
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/415953/generate-md5-hash-in-java">Generate MD5 hash in Java</a>  </p>
  </blockquote>
  
  
  
  <p>Can some one tell me how to convert a string into MD5 format in Java?</p>
  
  <p>I have code like this, but I want in MD5 format with 32 characters.</p>
  
  <pre><code>UUID uuid = UUID.randomUUID();
  String token = uuid.toString().substring(0,12);
  </code></pre>