Here you can find the source of MD5(byte[] bytes)
public static byte[] MD5(byte[] bytes)
//package com.java2s; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static byte[] MD5(byte[] bytes) { return digest("MD5", bytes); }/*from ww w . j av a2 s . c om*/ private static byte[] digest(String type, byte[] bytes) { try { MessageDigest dist = MessageDigest.getInstance(type); return dist.digest(bytes); } catch (NoSuchAlgorithmException e) { throw new IllegalArgumentException("Cannot find digest:" + type, e); } } }