Here you can find the source of md5Encode(String strPlain)
public static String md5Encode(String strPlain)
//package com.java2s; import java.security.MessageDigest; public class Main { public static String md5Encode(String strPlain) { byte[] s = md5(strPlain); StringBuilder result = new StringBuilder(); for (int i = 0; i < s.length; i++) { result.append(Integer.toHexString((0x000000ff & s[i]) | 0xffffff00).substring(6)); }//w w w .j a v a 2 s . c om return result.toString(); } public static byte[] md5(String strPlain) { byte s[] = null; try { MessageDigest m = MessageDigest.getInstance("MD5"); m.update(strPlain.getBytes("UTF8")); s = m.digest(); } catch (Exception e) { throw new RuntimeException(e); } return s; } }