code: public static GaloisField getInstance(int fieldSize,
        int primitivePolynomial) {
      int key = ((fieldSize << 16) & 0xFFFF0000) + (primitivePolynomial & 0x0000FFFF);
      GaloisField gf;
      synchronized (instances) {
        gf = instances.get(key);
        if (gf == null) {
          gf = new GaloisField(fieldSize, primitivePolynomial);
          instances.put(key, gf);
        }
      }
      return gf;
    }
docs: Get the object performs Galois field arithmetics
  @param fieldSize size of the field
  @param primitivePolynomial a primitive polynomial corresponds to the size