Java MD5 Encode md5Encode(byte[] content)

Here you can find the source of md5Encode(byte[] content)

Description

md Encode

License

Apache License

Declaration

public static byte[] md5Encode(byte[] content) throws NoSuchAlgorithmException, InvalidKeyException 

Method Source Code


//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*/
}

Related

  1. MD5Encode(final String origin, final String charsetname)
  2. md5Encode(String input, String encoding)
  3. md5Encode(String inStr)
  4. md5Encode(String inStr)