code: private static int[] getErrorCorrection(int[] codewords, int ecclen) {
  
          ReedSolomon rs = new ReedSolomon();
          rs.init_gf(0x43);
          rs.init_code(ecclen, 1);
          rs.encode(codewords.length, codewords);
  
          int[] results = new int[ecclen];
          for (int i = 0; i < ecclen; i++) {
              results[i] = rs.getResult(results.length - 1 - i);
          }
  
          return results;
      }
docs: Returns the error correction codewords for the specified data codewords.
  
  @param codewords the codewords that we need error correction codewords for
  @param ecclen the number of error correction codewords needed
  @return the error correction codewords for the specified data codewords