code: public static String asHex (byte[] hash) {
  		StringBuilder buf = new StringBuilder(hash.length * 2);
  		int i;
  
  		for (i = 0; i < hash.length; i++) {
  			if (((int) hash[i] & 0xff) < 0x10) 
  				buf.append("0");
  
  			buf.append(Long.toString((int) hash[i] & 0xff, 16));
  		}
  
  		return buf.toString();
  	}
docs: Turns array of bytes into string representing each byte as
  unsigned hex number.
  
  @param hash	Array of bytes to convert to hex-string
  @return	Generated hex string