Here you can find the source of md5Encode(byte[] content)
public static byte[] md5Encode(byte[] content) throws NoSuchAlgorithmException, InvalidKeyException
//package com.java2s; //License from project: Apache License import java.security.InvalidKeyException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { public static byte[] md5Encode(byte[] content) throws NoSuchAlgorithmException, InvalidKeyException { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] mdRes = md.digest(content); return mdRes; }/*from www . j a va2s. c o m*/ }