Java MD5 md5HashByteToString(byte[] bytes)

Here you can find the source of md5HashByteToString(byte[] bytes)

Description

Creates an MD5 string from the given bytes.

License

Open Source License

Parameter

Parameter Description
bytes a parameter

Return

String value of the given bytes

Declaration

public static String md5HashByteToString(byte[] bytes) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from  w w  w.j  av  a  2  s .c  o  m
     * Creates an MD5 string from the given bytes.
     *
     * @param bytes
     * @return String value of the given bytes
     */
    public static String md5HashByteToString(byte[] bytes) {
        String result = "";
        for (int i = 0; i < bytes.length; i++) {
            result += Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1);
        }
        return result;
    }
}

Related

  1. md5_hh(int C, int B, int G, int F, int A, int E, int D)
  2. md5_id(byte[] md5digest)
  3. md5bytesToHex(byte[] md5)
  4. md5Encode(byte[] content)
  5. md5Encode(String strIn)
  6. md5HashStringToByte(String hash)
  7. md5Hex(final String text)
  8. md5Init()
  9. md5Memcpy(byte[] output, byte[] input, int outpos, int inpos, int len)