Here you can find the source of md5Hex(final String text)
public static String md5Hex(final String text)
//package com.java2s; //License from project: Apache License import javax.xml.bind.DatatypeConverter; import java.security.MessageDigest; public class Main { public static String md5Hex(final String text) { try {/*from www .j a v a2 s . c o m*/ final byte[] bytesOfMessage = text.getBytes("UTF-8"); final MessageDigest md = MessageDigest.getInstance("MD5"); final byte[] digest = md.digest(bytesOfMessage); return DatatypeConverter.printHexBinary(digest).toLowerCase(); } catch (Exception e) { throw new RuntimeException(); } } }