Here you can find the source of md5(byte[] str)
private static byte[] md5(byte[] str) throws NoSuchAlgorithmException
//package com.java2s; //License from project: LGPL import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { private static byte[] md5(byte[] str) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(str);/*from w w w . j a va 2 s. co m*/ return md.digest(); } }