Ejemplo n.º 1
0
 public Polynomial checkPolynomial(Long l) throws ArgParseException {
   Polynomial p = Polynomial.createFromLong(l);
   if (p.isReducible()) {
     throw new ArgParseException(
         "The specified polynomial is not irreducible and therefore invalid for the rabin fingerprint method. Please use -polygen to generate an irreducible polynomial.");
   }
   return p;
 }
Ejemplo n.º 2
0
 public void generatePolynomial(int deg) {
   Polynomial p = Polynomial.createIrreducible(deg);
   System.out.println(p.toHexString());
 }