Here you can find the source of md5(String userPass)
public static String md5(String userPass) throws Exception
//package com.java2s; //License from project: Apache License import java.math.BigInteger; public class Main { public static String md5(String userPass) throws Exception { java.security.MessageDigest md5 = java.security.MessageDigest .getInstance("MD5"); md5.update(userPass.getBytes()); byte b[] = md5.digest(); return new BigInteger(b).toString(16); }/*w ww.j av a 2 s.co m*/ }