Java MD5 Hash md5Hash(byte[] data)

Here you can find the source of md5Hash(byte[] data)

Description

md5Hash

License

Apache License

Parameter

Parameter Description
data a parameter

Exception

Parameter Description
Exception an exception

Declaration

public static byte[] md5Hash(byte[] data) throws Exception 

Method Source Code


//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);
    }
}

Related

  1. md5Hash(byte[] bytes)
  2. md5Hash(byte[] data)
  3. md5hash(byte[] input)
  4. md5Hash(byte[] key)
  5. md5Hash(String algorithm, String input)
  6. md5Hash(String buf)