Here you can find the source of md5(String password)
public static String md5(String password)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static String md5(String password) { String pass = ""; MessageDigest md = null;/*from w w w . jav a 2 s .c o m*/ try { md = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } BigInteger hash = new BigInteger(1, md.digest(password.getBytes())); pass = hash.toString(16); return pass; } }