Here you can find the source of md5(String content)
public static String md5(String content) throws UnsupportedEncodingException
//package com.java2s; //License from project: Open Source License import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import sun.misc.BASE64Encoder; public class Main { private static MessageDigest md5; private static BASE64Encoder base64en = new BASE64Encoder(); public static String md5(String content) throws UnsupportedEncodingException { return base64en.encode(md5.digest(content.getBytes("utf-8"))); }/*from w w w . j a v a2 s . com*/ }