Here you can find the source of md5(String message)
public static String md5(String message)
//package com.java2s; //License from project: LGPL import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static String md5(String message) { try {// w ww . ja v a2 s. co m MessageDigest md = MessageDigest.getInstance("MD5"); return new String(md.digest(message.getBytes("CP1252"))); } catch (NoSuchAlgorithmException e) { } catch (UnsupportedEncodingException e) { } return null; } }