Code examples for BigInteger

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
38:	BigInteger bi = new BigInteger("1"); 
39:	assert bi.intValue() == 1; 
-
41:	assert IntegerType.instance.fromString(IntegerType.instance.getString(ByteBuffer.wrap(bi.toByteArray()))) 
42:	.equals(ByteBuffer.wrap(bi.toByteArray())); 
43:	assert IntegerType.instance.compose(ByteBuffer.wrap(bi.toByteArray())).equals(bi); 
44:	assert IntegerSerializer.instance.toString(bi).equals("1"); 
Full Snippet Info
10
CodeRank
218:	assertInvalid(testee, new ModelNode().set(BigInteger.valueOf(Integer.MAX_VALUE).add(BigInteger.ONE))); 
219:	assertInvalid(testee, new ModelNode().set(BigInteger.valueOf(Integer.MIN_VALUE).subtract(BigInteger.ONE))); 
Full Snippet Info
8
CodeRank
129:	integerType = new BigInteger(source); 
-
136:	return decompose(integerType); 
Full Snippet Info
8
CodeRank
50:	int e = (n.bitLength() + 1) / 2; 
-
67:	BigInteger s = d1U.getD().multiply(Q2UBar).mod(n).add(d2U.getD()).mod(n); 
-
73:	BigInteger hs = parameters.getH().multiply(s).mod(n); 
-
77:	Q1V.getQ(), Q2VBar.multiply(hs).mod(n), Q2V.getQ(), hs); 
Full Snippet Info
8
CodeRank
67:	k = new BigInteger(qBitLength, random); 
-
69:	while (k.compareTo(params.getQ()) >= 0); 
-
71:	BigInteger  r = params.getG().modPow(k, params.getP()).mod(params.getQ()); 
-
73:	k = k.modInverse(params.getQ()).multiply( 
Full Snippet Info
8
CodeRank
27:	BigInteger integer = new BigInteger(sud,16); 
-
29:	System.out.println("bi ="+integer.toString() ); 
Full Snippet Info
7
CodeRank
38:	BigInteger bi = new BigInteger(md5).abs(); 
Full Snippet Info
7
CodeRank
54:	doTestHMACDetDSASample("SHA224withDETDSA", privKey, new BigInteger("4BC3B686AEA70145856814A6F1BB53346F02101E", 16), new BigInteger("410697B92295D994D21EDD2F4ADA85566F6F94C1", 16)); 
-
121:	if (!r.equals(ASN1Integer.getInstance(seq.getObjectAt(0)).getValue())) 
Full Snippet Info
7
CodeRank
87:	BigInteger bi = new BigInteger(values.replaceAll(":", ""),16); 
88:	if (bi.bitLength() > 64) 
-
90:	return bi.longValue(); 
Full Snippet Info
7
CodeRank
38:	BigInteger aNumber1 = new BigInteger(value1); 
-
40:	int code1 = aNumber1.hashCode(); 
41:	aNumber1.add(aNumber2).shiftLeft(125); 
42:	aNumber1.subtract(aNumber2).shiftRight(125); 
43:	aNumber1.multiply(aNumber2).toByteArray(); 
44:	aNumber1.divide(aNumber2).bitLength(); 
45:	aNumber1.gcd(aNumber2).pow(7); 
46:	int code2 = aNumber1.hashCode(); 
Full Snippet Info
7
CodeRank
17:	BigInteger mine = new BigInteger(""+2); 
18:	BigInteger pow = mine.pow(127); 
19:	BigInteger div = pow.divide(new BigInteger(numNodes+"")); 
20:	return ""+div.multiply(new BigInteger(i+"")); 
Full Snippet Info
7
CodeRank
43:	int minBits = Math.min(256, N.bitLength() / 2); 
-
45:	BigInteger max = N.subtract(ONE); 
-
47:	return BigIntegers.createRandomInRange(min, max, random); 
Full Snippet Info
7
CodeRank
209:	BigInteger value = new BigInteger( text, radix ); 
-
214:	return Integer.valueOf( value.intValue() ); 
-
216:	return new Long( value.longValue() ); 
-
222:	if( value.compareTo(MAX_INTEGER) <= 0 && value.compareTo(MIN_INTEGER) >= 0 ) 
-
224:	return Integer.valueOf(value.intValue()); 
-
226:	else if( value.compareTo(MAX_LONG) <= 0 && value.compareTo(MIN_LONG) >= 0 ) 
-
228:	return new Long(value.longValue()); 
Full Snippet Info
7
CodeRank
27:	BigInteger integer = new BigInteger(sud,16); 
-
29:	System.out.println("bi ="+integer.toString() ); 
Full Snippet Info
7
CodeRank
331:	assertToNumberOverflow(BigInteger.valueOf(Integer.MAX_VALUE).add(BigInteger.ONE), Integer.class); 
332:	assertToNumberOverflow(BigInteger.valueOf(Integer.MIN_VALUE).subtract(BigInteger.ONE), Integer.class); 
Full Snippet Info
7
CodeRank
38:	BigInteger aNumber1 = new BigInteger(value1); 
-
40:	int code1 = aNumber1.hashCode(); 
41:	aNumber1.add(aNumber2).shiftLeft(125); 
42:	aNumber1.subtract(aNumber2).shiftRight(125); 
43:	aNumber1.multiply(aNumber2).toByteArray(); 
44:	aNumber1.divide(aNumber2).bitLength(); 
45:	aNumber1.gcd(aNumber2).pow(7); 
46:	int code2 = aNumber1.hashCode(); 
Full Snippet Info
7
CodeRank
131:	if(bi.compareTo(INTEGER_MAX) <= 0 && bi.compareTo(INTEGER_MIN) >= 0) 
-
134:	return new Integer(bi.intValue()); 
-
136:	if(bi.compareTo(LONG_MAX) <= 0 && bi.compareTo(LONG_MIN) >= 0) 
-
139:	return new Long(bi.longValue()); 
Full Snippet Info
7
CodeRank
20:	return new BigInteger(value); 
Full Snippet Info
7
CodeRank
33:	private static Logger LOG = LoggerFactory.getLogger(TokenAwareConnectionPoolTest.class); 
-
117:	BigInteger threeNodeRingIncrement = new BigInteger("600"); 
-
121:	Operation<TestClient, String> thirdHostOp    = new TokenTestOperation(threeNodeRingIncrement.multiply(new BigInteger("2"))); 
122:	Operation<TestClient, String> maxTokenHostOp = new TokenTestOperation(threeNodeRingIncrement.multiply(new BigInteger("3"))); 
Full Snippet Info
7
CodeRank