Here you can find the source of md5(byte data[])
public static byte[] md5(byte data[])
//package com.java2s; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static byte[] md5(byte data[]) { return getDigest().digest(data); }// www . j a v a 2s . c o m public static byte[] md5(String data) { return md5(data.getBytes()); } static MessageDigest getDigest() { try { return MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } } }