Here you can find the source of md5(byte[] bytes)
Parameter | Description |
---|---|
bytes | a parameter |
public static byte[] md5(byte[] bytes) throws NoSuchAlgorithmException
//package com.java2s; //License from project: LGPL import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Main { /**/* ww w . j av a2s .c o m*/ * Transform string to md5. * * @param bytes * @return */ public static byte[] md5(byte[] bytes) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("MD5"); return md.digest(bytes); } }