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 ; }
Get the object performs Galois field arithmetics