Java Hash String hashToString(byte hash[])

Here you can find the source of hashToString(byte hash[])

Description

hash To String

License

Open Source License

Declaration

public static String hashToString(byte hash[]) 

Method Source Code

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

public class Main {
    public static String hashToString(byte hash[]) {
        StringBuilder sb = new StringBuilder();
        for (byte b : hash) {
            int nibble1 = (b & 0xF0) >> 4;
            int nibble2 = b & 0x0F;
            sb.append(Integer.toHexString(nibble1));
            sb.append(Integer.toHexString(nibble2));
        }/* w  w w  .ja v  a 2s. c  om*/
        return sb.toString();
    }
}

Related

  1. hashTermToString(int i, int h)
  2. hasHtmlTag(String content)
  3. hasHTMLTag(String html)
  4. hasHTMLTag(String text)
  5. hashToHexString(byte[] hash)
  6. hasHttp(String url)