Here you can find the source of computeMd5Hash(byte[] in)
Parameter | Description |
---|---|
in | the byte array to hash |
public static byte[] computeMd5Hash(byte[] in)
//package com.java2s; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { /**/*w w w. j ava 2 s . c o m*/ * Compute the MD5 hash of the byte array provided. Does not accumulate * input. * @param in the byte array to hash * @return the MD5 hash of the byte array */ public static byte[] computeMd5Hash(byte[] in) { try { MessageDigest md5 = MessageDigest.getInstance("MD5"); return md5.digest(in); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } } }