Here you can find the source of md5Hash(byte[] data)
Parameter | Description |
---|---|
data | a parameter |
Parameter | Description |
---|---|
Exception | an exception |
public static byte[] md5Hash(byte[] data) throws Exception
//package com.java2s; //License from project: Apache License import java.security.MessageDigest; public class Main { /**/* w w w .j a v a 2 s . c o m*/ * md5Hash * * @param data * * @return * * @throws Exception */ public static byte[] md5Hash(byte[] data) throws Exception { MessageDigest md = MessageDigest.getInstance("MD5"); return md.digest(data); } }