Here you can find the source of MD5(String md5)
public static String MD5(String md5)
//package com.java2s; //License from project: Open Source License public class Main { public static String MD5(String md5) { try {// w w w .j av a 2 s. c om java.security.MessageDigest md = java.security.MessageDigest .getInstance("MD5"); byte[] array = md.digest(md5.getBytes()); StringBuilder sb = new StringBuilder(); for (byte aByte : array) { sb.append(Integer.toHexString((aByte & 0xFF) | 0x100) .substring(1, 3)); } return sb.toString(); } catch (java.security.NoSuchAlgorithmException ignored) { } return null; } }