|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectvotingSystem.Utility
This class implements some useful functions for use with the cryptosystem
Constructor Summary | |
Utility()
|
Method Summary | |
static int |
bigIntToInt(java.math.BigInteger i)
Converts a BigInteger to an int |
static long |
faculty(long n)
Calculates n! |
static java.math.BigInteger |
intToBigInt(int i)
Converts an int to a BigInteger |
static java.math.BigInteger |
lcm(java.math.BigInteger n1,
java.math.BigInteger n2)
Finds the least common multiplum of two BigIntegers |
static double |
log2(int i)
|
static java.math.BigInteger |
longToBigInt(long i)
Converts a long to a BigInteger |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utility()
Method Detail |
public static int bigIntToInt(java.math.BigInteger i)
i
- BigInteger to be converted
public static java.math.BigInteger intToBigInt(int i)
i
- int to be converted
public static java.math.BigInteger longToBigInt(long i)
i
- The long to be converted
public static java.math.BigInteger lcm(java.math.BigInteger n1, java.math.BigInteger n2)
n1
- n2
-
public static long faculty(long n)
n
-
public static double log2(int i)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |