code: private static String digestToString(byte[] b) {
          
          StringBuilder result = new StringBuilder(128);
          for (byte aB : b) {
              result.append(Integer.toString((aB & 0xff) + 0x100, 16).substring(1));
          }
          
          return result.toString();
      }
docs: This method convert byte array to string regardless the charset
  
  @param b
  byte array input
  @return the corresponding string