throws InvalidParameterException
{
this.m = m;
if (m < 1)
{
throw new InvalidParameterException("m must be positive");
}
if (m > 32)
{
throw new InvalidParameterException(" m is too large");
}
this.n = 1 << m;
this.t = t;
if (t < 0)
{
throw new InvalidParameterException("t must be positive");
}
if (t > n)
{
throw new InvalidParameterException("t must be less than n = 2^m");
}
if ((PolynomialRingGF2.degree(poly) == m)
&& (PolynomialRingGF2.isIrreducible(poly)))
{
this.fieldPoly = poly;
}
else
{
throw new InvalidParameterException(
"polynomial is not a field polynomial for GF(2^m)");
}
}