public static String translateHashToString(byte[] hash){
  StringBuilder hashBuffer=new StringBuilder();
  for (int i=0; i < hash.length; i++) {
    hashBuffer.append(Character.forDigit((hash[i] >> 4) & 0x0F,16));
    hashBuffer.append(Character.forDigit(hash[i] & 0x0F,16));
  }
  return hashBuffer.toString();
}

public static String translateHashToString ( byte [ ] hash ) { StringBuilder hashBuffer = new StringBuilder ( ) ; for ( int i = 0 ; i < hash . length ; i ++ ) { hashBuffer . append ( Character . forDigit ( ( hash [ i ] > > 4 ) & 0x0F , 16 ) ) ; hashBuffer . append ( Character . forDigit ( hash [ i ] & 0x0F , 16 ) ) ; } return hashBuffer . toString ( ) ; }
translate the byte array into hex string .
