code: public static String checksumBytesToString(byte[] digestBytes) {
          StringBuffer hexString = new StringBuffer();
          for (int i = 0; i < digestBytes.length; i++) {
              String hex = Integer.toHexString(0xff & digestBytes[i]);
              if (hex.length() == 1) {
                  hexString.append('0');
              }
              hexString.append(hex);
          }
          return hexString.toString();
      }
docs: Converts a message digest byte array into a String based
  on the hex values appearing in the array.