Home
last modified time | relevance | path

Searched refs:BigInteger (Results 1 – 25 of 282) sorted by relevance

12345678910>>...12

/libcore/luni/src/test/java/tests/security/spec/
DRSAMultiPrimePrivateCrtKeySpecTest.java27 import java.math.BigInteger;
44 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
45 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE),
46 new RSAOtherPrimeInfo(BigInteger.ONE, BigInteger.ONE, BigInteger.ONE)
68 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
69 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
70 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
71 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
72 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
73 BigInteger.ONE, in testRSAMultiPrimePrivateCrtKeySpec01()
[all …]
DRSAPrivateCrtKeySpecTest.java27 import java.math.BigInteger;
47 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
48 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
49 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
50 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
51 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
52 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
53 BigInteger.ONE, in testRSAPrivateCrtKeySpec01()
54 BigInteger.ONE); in testRSAPrivateCrtKeySpec01()
65 BigInteger.ONE, in testRSAPrivateCrtKeySpec02()
[all …]
DEllipticCurveTest.java22 import java.math.BigInteger;
44 ECFieldFp f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
45 BigInteger a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
46 BigInteger b = BigInteger.valueOf(19L); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
53 a = BigInteger.ZERO; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
54 b = BigInteger.valueOf(23L); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
60 f = new ECFieldFp(BigInteger.valueOf(23L)); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
61 a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
62 b = BigInteger.valueOf(19L); in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray01()
79 BigInteger a = BigInteger.ONE; in testEllipticCurveECFieldBigIntegerBigIntegerbyteArray02()
[all …]
DECPointTest.java27 import java.math.BigInteger;
47 new ECPoint(BigInteger.ZERO, BigInteger.ZERO); in testECPoint01()
48 new ECPoint(BigInteger.valueOf(-23456L), BigInteger.valueOf(-23456L)); in testECPoint01()
49 new ECPoint(BigInteger.valueOf(123456L), BigInteger.valueOf(123456L)); in testECPoint01()
50 new ECPoint(BigInteger.valueOf(-56L), BigInteger.valueOf(234L)); in testECPoint01()
51 new ECPoint(BigInteger.valueOf(3456L), BigInteger.valueOf(-2344L)); in testECPoint01()
64 new ECPoint(null, BigInteger.ZERO); in testECPoint02()
72 new ECPoint(BigInteger.ZERO, null); in testECPoint02()
96 BigInteger x = BigInteger.valueOf(-23456L); in testGetAffineX01()
97 ECPoint p = new ECPoint(x, BigInteger.valueOf(23456L)); in testGetAffineX01()
[all …]
DDSAPublicKeySpecTest.java27 import java.math.BigInteger;
42 new BigInteger("1"), // y in testDSAPublicKeySpec()
43 new BigInteger("2"), // p in testDSAPublicKeySpec()
44 new BigInteger("3"), // q in testDSAPublicKeySpec()
45 new BigInteger("4"));// g in testDSAPublicKeySpec()
55 new BigInteger("1"), // y in testGetG()
56 new BigInteger("2"), // p in testGetG()
57 new BigInteger("3"), // q in testGetG()
58 new BigInteger("4"));// g in testGetG()
68 new BigInteger("1"), // y in testGetP()
[all …]
DDSAPrivateKeySpecTest.java27 import java.math.BigInteger;
42 new BigInteger("1"), in testDSAPrivateKeySpec()
43 new BigInteger("2"), in testDSAPrivateKeySpec()
44 new BigInteger("3"), in testDSAPrivateKeySpec()
45 new BigInteger("4")); in testDSAPrivateKeySpec()
55 new BigInteger("1"), in testGetG()
56 new BigInteger("2"), in testGetG()
57 new BigInteger("3"), in testGetG()
58 new BigInteger("4")); in testGetG()
68 new BigInteger("1"), in testGetP()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerXorTest.java24 import java.math.BigInteger;
38 BigInteger aNumber = new BigInteger(numA); in testZeroPos()
39 BigInteger bNumber = new BigInteger(numB); in testZeroPos()
40 BigInteger result = aNumber.xor(bNumber); in testZeroPos()
51 BigInteger aNumber = new BigInteger(numA); in testZeroNeg()
52 BigInteger bNumber = new BigInteger(numB); in testZeroNeg()
53 BigInteger result = aNumber.xor(bNumber); in testZeroNeg()
64 BigInteger aNumber = new BigInteger(numA); in testPosZero()
65 BigInteger bNumber = new BigInteger(numB); in testPosZero()
66 BigInteger result = aNumber.xor(bNumber); in testPosZero()
[all …]
DOldBigIntegerTest.java20 import java.math.BigInteger;
25 BigInteger minusOne = new BigInteger("-1", 10);
27 BigInteger two = new BigInteger("2", 10);
29 BigInteger aZillion = new BigInteger("100000000000000000000000000000000000000000000000000", 10);
33 BigInteger bi;
35 BigInteger bi2;
37 BigInteger bi3;
45 new BigInteger(128, (Random) null); in test_ConstructorILjava_util_Random()
50 bi = new BigInteger(70, rand); in test_ConstructorILjava_util_Random()
51 bi2 = new BigInteger(70, rand); in test_ConstructorILjava_util_Random()
[all …]
DBigIntegerModPowTest.java24 import java.math.BigInteger;
41 BigInteger aNumber = new BigInteger(aSign, aBytes); in testModPowException()
42 BigInteger exp = new BigInteger(eSign, eBytes); in testModPowException()
43 BigInteger modulus = new BigInteger(mSign, mBytes); in testModPowException()
51 BigInteger.ZERO.modPow(new BigInteger("-1"), new BigInteger("10")); in testModPowException()
69 BigInteger aNumber = new BigInteger(aSign, aBytes); in testModPowPosExp()
70 BigInteger exp = new BigInteger(eSign, eBytes); in testModPowPosExp()
71 BigInteger modulus = new BigInteger(mSign, mBytes); in testModPowPosExp()
72 BigInteger result = aNumber.modPow(exp, modulus); in testModPowPosExp()
92 BigInteger aNumber = new BigInteger(aSign, aBytes); in testModPowNegExp()
[all …]
DBigIntegerCompareTest.java24 import java.math.BigInteger;
38 BigInteger aNumber = new BigInteger(aSign, aBytes); in testAbsPositive()
39 BigInteger result = aNumber.abs(); in testAbsPositive()
55 BigInteger aNumber = new BigInteger(aSign, aBytes); in testAbsNegative()
56 BigInteger result = aNumber.abs(); in testAbsNegative()
75 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToPosPos1()
76 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCompareToPosPos1()
90 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToPosPos2()
91 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCompareToPosPos2()
104 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCompareToEqualPos()
[all …]
DBigIntegerDivideTest.java24 import java.math.BigInteger;
39 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1()
40 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase1()
54 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2()
55 BigInteger bNumber = BigInteger.ZERO; in testCase2()
72 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3()
73 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase3()
74 BigInteger result = aNumber.divide(bNumber); in testCase3()
92 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase4()
93 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase4()
[all …]
DBigIntegerAddTest.java24 import java.math.BigInteger;
40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1()
41 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase1()
42 BigInteger result = aNumber.add(bNumber); in testCase1()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2()
61 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase2()
62 BigInteger result = aNumber.add(bNumber); in testCase2()
82 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3()
83 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase3()
84 BigInteger result = aNumber.add(bNumber); in testCase3()
[all …]
DBigIntegerAndTest.java24 import java.math.BigInteger;
40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroPos()
41 BigInteger bNumber = new BigInteger(bSign, bBytes); in testZeroPos()
42 BigInteger result = aNumber.and(bNumber); in testZeroPos()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroNeg()
61 BigInteger bNumber = new BigInteger(bSign, bBytes); in testZeroNeg()
62 BigInteger result = aNumber.and(bNumber); in testZeroNeg()
80 BigInteger aNumber = new BigInteger(aSign, aBytes); in testPosZero()
81 BigInteger bNumber = new BigInteger(bSign, bBytes); in testPosZero()
82 BigInteger result = aNumber.and(bNumber); in testPosZero()
[all …]
DBigIntegerSubtractTest.java24 import java.math.BigInteger;
41 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1()
42 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase1()
43 BigInteger result = aNumber.subtract(bNumber); in testCase1()
62 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2()
63 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase2()
64 BigInteger result = aNumber.subtract(bNumber); in testCase2()
84 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3()
85 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase3()
86 BigInteger result = aNumber.subtract(bNumber); in testCase3()
[all …]
DBigIntegerOrTest.java24 import java.math.BigInteger;
40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroPos()
41 BigInteger bNumber = new BigInteger(bSign, bBytes); in testZeroPos()
42 BigInteger result = aNumber.or(bNumber); in testZeroPos()
60 BigInteger aNumber = new BigInteger(aSign, aBytes); in testZeroNeg()
61 BigInteger bNumber = new BigInteger(bSign, bBytes); in testZeroNeg()
62 BigInteger result = aNumber.or(bNumber); in testZeroNeg()
80 BigInteger aNumber = new BigInteger(aSign, aBytes); in testPosZero()
81 BigInteger bNumber = new BigInteger(bSign, bBytes); in testPosZero()
82 BigInteger result = aNumber.or(bNumber); in testPosZero()
[all …]
DBigIntegerOperateBitsTest.java24 import java.math.BigInteger;
36 BigInteger aNumber = new BigInteger("0"); in testBitCountZero()
44BigInteger aNumber = new BigInteger("-12378634756382937873487638746283767238657872368748726875"); in testBitCountNeg()
52BigInteger aNumber = new BigInteger("1237863475634356475758293787348763874628376723865787236874872… in testBitCountPos()
60 BigInteger aNumber = new BigInteger("0"); in testBitLengthZero()
70 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthPositive1()
80 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthPositive2()
90 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthPositive3()
100 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthNegative1()
110 BigInteger aNumber = new BigInteger(aSign, aBytes); in testBitLengthNegative2()
[all …]
DBigIntegerTest.java20 import java.math.BigInteger;
25 BigInteger minusTwo = new BigInteger("-2", 10);
27 BigInteger minusOne = new BigInteger("-1", 10);
29 BigInteger zero = new BigInteger("0", 10);
31 BigInteger one = new BigInteger("1", 10);
33 BigInteger two = new BigInteger("2", 10);
35 BigInteger ten = new BigInteger("10", 10);
37 BigInteger sixteen = new BigInteger("16", 10);
39 BigInteger oneThousand = new BigInteger("1000", 10);
41 BigInteger aZillion = new BigInteger(
[all …]
DBigIntegerMultiplyTest.java24 import java.math.BigInteger;
40 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase1()
41 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase1()
42 BigInteger result = aNumber.multiply(bNumber); in testCase1()
61 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase2()
62 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase2()
63 BigInteger result = aNumber.multiply(bNumber); in testCase2()
83 BigInteger aNumber = new BigInteger(aSign, aBytes); in testCase3()
84 BigInteger bNumber = new BigInteger(bSign, bBytes); in testCase3()
85 BigInteger result = aNumber.multiply(bNumber); in testCase3()
[all …]
/libcore/ojluni/src/test/java/math/BigInteger/
DTestValueExact.java30 package test.java.math.BigInteger;
32 import java.math.BigInteger;
42 BigInteger[] inRange = { in testLongValueExact()
43 BigInteger.valueOf(Long.MIN_VALUE), in testLongValueExact()
44 BigInteger.ZERO, in testLongValueExact()
45 BigInteger.valueOf(Long.MAX_VALUE) in testLongValueExact()
48 BigInteger[] outOfRange = { in testLongValueExact()
49 BigInteger.valueOf(Long.MIN_VALUE).subtract(BigInteger.ONE), in testLongValueExact()
50 BigInteger.valueOf(Long.MAX_VALUE).add(BigInteger.ONE) in testLongValueExact()
53 for (BigInteger bi : inRange) { in testLongValueExact()
[all …]
DBigIntegerTest.java35 package test.java.math.BigInteger;
44 import java.math.BigInteger;
132 BigInteger bi = new BigInteger(array, ol[0], ol[1]); in constructor()
150 BigInteger bi = new BigInteger(1, array, ol[0], ol[1]); in constructor()
169 BigInteger bi = new BigInteger(signum, magZeroLength); in constructor()
170 Assert.assertEquals(bi.compareTo(BigInteger.ZERO), 0, in constructor()
175 BigInteger bi = new BigInteger(signum, magZeroLength, 0, 0); in constructor()
176 Assert.assertEquals(bi.compareTo(BigInteger.ZERO), 0, in constructor()
183 BigInteger bi = new BigInteger(signum, magNonZeroLength, 0, 0); in constructor()
184 Assert.assertEquals(bi.compareTo(BigInteger.ZERO), 0, in constructor()
[all …]
/libcore/ojluni/src/main/java/java/security/spec/
DRSAPrivateCrtKeySpec.java28 import java.math.BigInteger;
49 private final BigInteger publicExponent;
50 private final BigInteger primeP;
51 private final BigInteger primeQ;
52 private final BigInteger primeExponentP;
53 private final BigInteger primeExponentQ;
54 private final BigInteger crtCoefficient;
69 public RSAPrivateCrtKeySpec(BigInteger modulus, in RSAPrivateCrtKeySpec()
70 BigInteger publicExponent, in RSAPrivateCrtKeySpec()
71 BigInteger privateExponent, in RSAPrivateCrtKeySpec()
[all …]
DRSAMultiPrimePrivateCrtKeySpec.java28 import java.math.BigInteger;
53 private final BigInteger publicExponent;
54 private final BigInteger primeP;
55 private final BigInteger primeQ;
56 private final BigInteger primeExponentP;
57 private final BigInteger primeExponentQ;
58 private final BigInteger crtCoefficient;
85 public RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus, in RSAMultiPrimePrivateCrtKeySpec()
86 BigInteger publicExponent, in RSAMultiPrimePrivateCrtKeySpec()
87 BigInteger privateExponent, in RSAMultiPrimePrivateCrtKeySpec()
[all …]
/libcore/luni/src/test/java/libcore/java/math/
DBigIntegerTest.java19 import java.math.BigInteger;
25 BigInteger firstBig = new BigInteger("30003543667898318853"); in test_hashCode()
26 BigInteger secondBig = new BigInteger("3298535022597"); in test_hashCode()
27 BigInteger andedBigs = firstBig.and(secondBig); in test_hashCode()
28 BigInteger toCompareBig = BigInteger.valueOf(andedBigs.longValue()); in test_hashCode()
38 assertEquals(i, BigInteger.valueOf(i).intValue()); in test_valueOf()
45 new BigInteger("1", 10); in test_invalidBigIntegerStringConversions()
46 new BigInteger("1a", 16); in test_invalidBigIntegerStringConversions()
47 new BigInteger("-1", 10); in test_invalidBigIntegerStringConversions()
48 new BigInteger("-1a", 16); in test_invalidBigIntegerStringConversions()
[all …]
/libcore/ojluni/annotations/sdk/nullability/java/math/
DBigInteger.annotated.java29 public class BigInteger extends java.lang.Number implements java.lang.Comparable<java.math.BigInteg… class
31 public BigInteger(byte[] val, int off, int len) { throw new RuntimeException("Stub!"); } in BigInteger() method in BigInteger
33 public BigInteger(byte[] val) { throw new RuntimeException("Stub!"); } in BigInteger() method in BigInteger
35 …public BigInteger(int signum, byte[] magnitude, int off, int len) { throw new RuntimeException("St… in BigInteger() method in BigInteger
37 public BigInteger(int signum, byte[] magnitude) { throw new RuntimeException("Stub!"); } in BigInteger() method in BigInteger
39 …public BigInteger(@libcore.util.NonNull java.lang.String val, int radix) { throw new RuntimeExcept… in BigInteger() method in BigInteger
41 …public BigInteger(@libcore.util.NonNull java.lang.String val) { throw new RuntimeException("Stub!"… in BigInteger() method in BigInteger
43 …public BigInteger(int numBits, @libcore.util.NonNull java.util.Random rnd) { throw new RuntimeExce… in BigInteger() method in BigInteger
45 …public BigInteger(int bitLength, int certainty, @libcore.util.NonNull java.util.Random rnd) { thro… in BigInteger() method in BigInteger
47 …@libcore.util.NonNull public static BigInteger probablePrime(int bitLength, @libcore.util.NonNull … in probablePrime()
[all …]
/libcore/luni/src/test/java/tests/security/interfaces/
DUtil.java17 import java.math.BigInteger;
33 static final BigInteger P = new BigInteger(
44 static final BigInteger Q = new BigInteger(
50 static final BigInteger G = new BigInteger(
61 static final BigInteger RND_RET = new BigInteger("10");
67 new BigInteger(
80 BigInteger.valueOf(65537),
81 new BigInteger(
94 new BigInteger(
102 new BigInteger(
[all …]

12345678910>>...12