Here you can find the source of md5(String input)
public static String md5(String input) throws Exception
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; import java.security.MessageDigest; public class Main { public static String md5(String input) throws Exception { MessageDigest md5 = MessageDigest.getInstance("MD5"); md5.update(input.getBytes("UTF-8")); BigInteger hash = new BigInteger(1, md5.digest()); return String.format("%1$032X", hash); }/*w w w .j av a 2 s. c om*/ }