public static String hashToString(byte[] hash){
  StringBuilder buf=new StringBuilder();
  for (  byte b : hash) {
    buf.append(HEX_CHARS[(b >> 4) & 0xF]);
    buf.append(HEX_CHARS[b & 0xF]);
  }
  return buf.toString();
}

public static String hashToString ( byte [ ] hash ) { StringBuilder buf = new StringBuilder ( ) ; for ( byte b : hash ) { buf . append ( HEX_CHARS [ ( b > > 4 ) & 0xF ] ) ; buf . append ( HEX_CHARS [ b & 0xF ] ) ; } return buf . toString ( ) ; }
convert a hash to a string of hex digits .
