Here you can find the source of md5(String text)
public static String md5(String text)
//package com.java2s; //License from project: Apache License import java.math.BigInteger; import java.security.MessageDigest; public class Main { private static MessageDigest md; public static String md5(String text) { byte[] bytes = md.digest(text.getBytes()); BigInteger bi = new BigInteger(bytes); return bi.toString(16); }/* www.ja v a2 s . c o m*/ }