/libcore/luni/src/test/java/libcore/java/math/ |
H A D | BigIntegerTest.java | 93 assertTrue(b.toString() + " " + b.bitLength(), b.bitLength() <= 128); 96 assertTrue(b.toString() + " " + b.bitLength(), b.bitLength() <= 16); 99 assertTrue(b.toString() + " " + b.bitLength(), b.bitLength() <= 5); 108 assertEquals(b.toString(), 128, b.bitLength()); 112 assertEquals(b.toString(), 16, b.bitLength()); 116 assertEquals(b.toString(), 5, b.bitLength()); 126 assertEquals(b.toString(), 2, b.bitLength()); [all...] |
/libcore/luni/src/main/java/java/security/spec/ |
H A D | ECFieldFp.java | 56 return p.bitLength();
|
H A D | EllipticCurve.java | 92 if (!(this.a.bitLength() <= fieldSizeInBits)) { 95 if (!(this.b.bitLength() <= fieldSizeInBits)) {
|
H A D | ECFieldF2m.java | 90 if ((this.rp.bitLength() != (m+1)) ||
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
H A D | OldBigIntegerTest.java | 86 assertEquals(i, bi.bitLength()); 176 for (int bitLength = 100; bitLength <= 600; bitLength += 100) { 177 BigInteger a = BigInteger.probablePrime(bitLength, rand); 178 BigInteger b = BigInteger.probablePrime(bitLength, rand); 182 " (bitLength = " + bitLength + ")", 222 for (int bitLength = 50; bitLength < [all...] |
H A D | BigIntegerHashCodeTest.java | 44 aNumber1.divide(aNumber2).bitLength();
|
H A D | BigIntegerConstructorsTest.java | 745 assertTrue("incorrect bitLength", aNumber.bitLength() <= bitLen); 757 assertEquals(b.toString(), bits, b.bitLength()); 762 assertEquals(b.toString(), bits, b.bitLength()); 767 assertEquals(b.toString(), bits, b.bitLength()); 773 assertEquals(b.toString(), bits, b.bitLength()); 778 assertTrue(b.toString(), b.bitLength() <= bits); 783 assertTrue(b.toString(), b.bitLength() <= bits);
|
H A D | BigIntegerTest.java | 760 int len = Math.max(i1.bitLength(), i2.bitLength()) + 66; 776 int len = Math.max(i1.bitLength(), i2.bitLength()) + 66; 792 int len = Math.max(i1.bitLength(), i2.bitLength()) + 66; 807 int len = i1.bitLength() + 66; 821 int len = Math.max(i1.bitLength(), i2.bitLength()) + 66;
|
H A D | BigIntegerOperateBitsTest.java | 28 * Methods: bitLength, shiftLeft, shiftRight, 57 * bitLength() of zero. 61 assertEquals(0, aNumber.bitLength()); 65 * bitLength() of a positive number. 71 assertEquals(108, aNumber.bitLength()); 75 * bitLength() of a positive number with the leftmost bit set 81 assertEquals(96, aNumber.bitLength()); 85 * bitLength() of a positive number which is a power of 2 91 assertEquals(81, aNumber.bitLength()); 95 * bitLength() o [all...] |
/libcore/luni/src/main/java/java/math/ |
H A D | BigDecimal.java | 185 LONG_FIVE_POW_BIT_LENGTH[i] = bitLength(LONG_FIVE_POW[i]); 188 LONG_POWERS_OF_TEN_BIT_LENGTH[i] = bitLength(MathUtils.LONG_POWERS_OF_TEN[i]); 217 private transient int bitLength; field in class:BigDecimal 240 this.bitLength = bitLength(smallValue); 246 this.bitLength = bitLength(smallValue); 345 bitLength = bitLength(smallValue); 489 int mantissaBits = bitLength(mantiss 2906 private static int bitLength(long smallValue) { method in class:BigDecimal 2913 private static int bitLength(int smallValue) { method in class:BigDecimal [all...] |
H A D | BigInteger.java | 149 * pow(2, bitLength)-1]} which is probably prime. The probability that the 154 * {@code bitLength >= 16}, where this implementation will use OpenSSL's 157 * @param bitLength length of the new {@code BigInteger} in bits. 159 * @throws ArithmeticException if {@code bitLength < 2}. 163 public BigInteger(int bitLength, int certainty, Random random) { argument 164 if (bitLength < 2) { 165 throw new ArithmeticException("bitLength < 2: " + bitLength); 167 if (bitLength < 16) { 171 candidate = random.nextInt() & ((1 << bitLength) 518 public int bitLength() { method in class:BigInteger 1061 probablePrime(int bitLength, Random random) argument [all...] |
H A D | NativeBN.java | 74 public static native int bitLength(long a); method in class:NativeBN
|
H A D | BigInt.java | 219 int actualByteCount = (NativeBN.bitLength(this.bignum) + 7) / 8; 223 int bitLength() { method in class:BigInt 224 return NativeBN.bitLength(this.bignum); 339 static BigInt generatePrimeDefault(int bitLength) { argument 341 NativeBN.BN_generate_prime_ex(r.bignum, bitLength, false, 0, 0, 0);
|
H A D | Primality.java | 94 if (ni.bitLength() <= 10) { 109 // j = startPoint.bitLength();
|
H A D | Conversion.java | 76 int resLengthInChars = (int) (val.abs().bitLength() / bitsForRadixDigit + ((sign < 0) ? 1 420 // val.bitLength() < 64 425 // val.bitLength() >= 33 * 32 > 1024 430 int bitLen = val.abs().bitLength();
|
H A D | BitLevel.java | 40 /** @see BigInteger#bitLength() */ 41 static int bitLength(BigInteger val) { method in class:BitLevel 89 * must be in the range {@code [0, val.bitLength()-1]} 93 // PRE: 0 <= n < val.bitLength()
|
/libcore/luni/src/main/java/java/lang/ |
H A D | HexStringParser.java | 234 int bitLength = countBitsLength(mantissa); 235 if (bitLength > desiredWidth) { 236 discardTrailingBits(bitLength - desiredWidth); 238 mantissa <<= (desiredWidth - bitLength);
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
H A D | RandomPrivateKeyX509ExtendedKeyManager.java | 58 int keyLengthBits = originalKeySpec.getModulus().bitLength();
|
/libcore/luni/src/main/java/java/text/ |
H A D | NumberFormat.java | 274 * {@code BigInteger} where {@code BigInteger.bitLength} returns <i>less than</i> 64. All other 297 (object instanceof BigInteger && ((BigInteger) object).bitLength() < 64)) {
|
H A D | DecimalFormat.java | 696 char[] chars = (bigInteger.bitLength() < 64)
|
/libcore/luni/src/main/native/ |
H A D | java_math_NativeBN.cpp | 588 NATIVE_METHOD(NativeBN, bitLength, "(J)I"),
|
/libcore/luni/src/test/java/libcore/java/security/ |
H A D | SignatureTest.java | 1265 final int oneTooBig = RSA_2048_modulus.bitLength() - 10; 1287 final int oneTooBig = RSA_2048_modulus.bitLength() - 10; 1310 final int oneTooBig = RSA_2048_modulus.bitLength() + 1; 1332 final int tooBig = RSA_2048_modulus.bitLength() * 2;
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
H A D | CipherTest.java | 2304 final int modulusInBytes = RSA_2048_modulus.bitLength() / 8;
|