Here you can find the source of md5Util(String password)
public static String md5Util(String password)
//package com.java2s; //License from project: Apache License import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.HashMap; public class Main { public static String md5Util(String password) { MessageDigest messageDigest = null; try {/*from w w w . j a va2 s .c om*/ messageDigest = MessageDigest.getInstance("md5"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } messageDigest.update(password.getBytes()); byte[] data = messageDigest.digest(); StringBuffer sb = new StringBuffer(); for (byte b : data) { int bt = b & 0xff; if (bt < 16) { sb.append("0"); } sb.append(Integer.toHexString(bt)); } HashMap<String, String> map = new HashMap<String, String>(20, 0.75f); map.put(null, "test"); return sb.toString(); } }