Here you can find the source of md5crypt(String s)
public static String md5crypt(String s)
//package com.java2s; //License from project: Open Source License import java.security.MessageDigest; public class Main { private static MessageDigest md5 = null; private static StringBuffer digestBuffer = null; public static String md5crypt(String s) { System.out.println(s);/*from www. j ava 2 s. co m*/ digestBuffer.setLength(0); byte abyte0[] = md5.digest(s.getBytes()); for (int i = 0; i < abyte0.length; i++) digestBuffer.append(toHex(abyte0[i])); return digestBuffer.toString(); } private static String toHex(byte one) { String HEX = "0123456789ABCDEF"; char[] result = new char[2]; result[0] = HEX.charAt((one & 0xf0) >> 4); result[1] = HEX.charAt(one & 0x0f); return new String(result); } }