Java Hex Calculate ToHex(byte[] src)

Here you can find the source of ToHex(byte[] src)

Description

To Hex

License

Open Source License

Declaration

public static String ToHex(byte[] src) 

Method Source Code

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

public class Main {
    public static String ToHex(byte[] src) {
        String res = "";
        for (int i = 0; i < src.length; i++) {
            res += String.format("%02X", src[i] & 0xFF);
        }//  w w w.  jav  a 2s. c o  m
        return res.toLowerCase();
    }
}

Related

  1. toHex(byte[] input)
  2. toHex(byte[] key)
  3. toHex(byte[] raw)
  4. toHex(byte[] raw)
  5. toHex(byte[] raw)
  6. toHex(byte[] src)
  7. toHex(byte[] text)
  8. toHex(byte[] v)
  9. toHex(byte[] val)