public final class BigIntUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(java.math.BigInteger[] a,
java.math.BigInteger[] b)
Checks if two BigInteger arrays contain the same entries
|
static void |
fill(java.math.BigInteger[] array,
java.math.BigInteger value)
Fill the given BigInteger array with the given value.
|
static java.math.BigInteger[] |
subArray(java.math.BigInteger[] input,
int start,
int end)
Generates a subarray of a given BigInteger array.
|
static int[] |
toIntArray(java.math.BigInteger[] input)
Converts a BigInteger array into an integer array
|
static int[] |
toIntArrayModQ(int q,
java.math.BigInteger[] input)
Converts a BigInteger array into an integer array, reducing all
BigIntegers mod q.
|
static byte[] |
toMinimalByteArray(java.math.BigInteger value)
Return the value of big as a byte array.
|
public static boolean equals(java.math.BigInteger[] a, java.math.BigInteger[] b)
a
- first BigInteger arrayb
- second BigInteger arraypublic static void fill(java.math.BigInteger[] array, java.math.BigInteger value)
array
- the arrayvalue
- the valuepublic static java.math.BigInteger[] subArray(java.math.BigInteger[] input, int start, int end)
input
- -
the input BigInteger arraystart
- -
the start indexend
- -
the end indexpublic static int[] toIntArray(java.math.BigInteger[] input)
input
- -
the BigInteger arraypublic static int[] toIntArrayModQ(int q, java.math.BigInteger[] input)
q
- -
the modulusinput
- -
the BigInteger arraypublic static byte[] toMinimalByteArray(java.math.BigInteger value)
value
- the BigInteger value to be converted to a byte
array