We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acf6c2c commit c5bc01bCopy full SHA for c5bc01b
core/src/main/java/org/bouncycastle/math/field/FiniteFields.java
@@ -2,6 +2,8 @@
2
3
import java.math.BigInteger;
4
5
+import org.bouncycastle.util.BigIntegers;
6
+
7
public abstract class FiniteFields
8
{
9
static final FiniteField GF_2 = new PrimeField(BigInteger.valueOf(2));
@@ -39,7 +41,7 @@ public static FiniteField getPrimeField(BigInteger characteristic)
39
41
40
42
if (bitLength < 3)
43
- switch (characteristic.intValue())
44
+ switch (BigIntegers.intValueExact(characteristic))
45
46
case 2:
47
return GF_2;
0 commit comments