Here you can find the source of md5Hash(String source)
public static String md5Hash(String source) throws NoSuchAlgorithmException
//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 md5Hash(String source) throws NoSuchAlgorithmException { MessageDigest digest = MessageDigest.getInstance("MD5"); digest.update(source.getBytes(), 0, source.length()); return String.format("%032X", new BigInteger(1, digest.digest())); }/*from ww w . jav a 2 s.co m*/ }