Searched refs:bitLength (Results 1 - 22 of 22) sorted by relevance

/libcore/luni/src/test/java/libcore/java/math/
H A DBigIntegerTest.java93 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/ojluni/src/main/java/sun/security/util/
H A DKeyUtil.java77 size = pubk.getModulus().bitLength();
81 // Was: size = pubk.getParams().getOrder().bitLength();
89 size = params.getOrder().bitLength();
95 size = (params != null) ? params.getP().bitLength() : -1;
98 size = pubk.getParams().getP().bitLength();
/libcore/ojluni/src/main/java/java/security/spec/
H A DECFieldFp.java65 return p.bitLength();
H A DEllipticCurve.java63 if (c.bitLength() > m) {
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
H A DOldBigIntegerTest.java86 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 DBigIntegerHashCodeTest.java44 aNumber1.divide(aNumber2).bitLength();
H A DBigIntegerConstructorsTest.java745 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 DBigIntegerTest.java760 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 DBigIntegerOperateBitsTest.java28 * 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 DBigDecimal.java185 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
2961 private static int bitLength(long smallValue) { method in class:BigDecimal
2968 private static int bitLength(int smallValue) { method in class:BigDecimal
[all...]
H A DBigInteger.java149 * 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 DNativeBN.java74 public static native int bitLength(long a); method in class:NativeBN
H A DBigInt.java217 int actualByteCount = (NativeBN.bitLength(this.bignum) + 7) / 8;
221 int bitLength() { method in class:BigInt
222 return NativeBN.bitLength(this.bignum);
337 static BigInt generatePrimeDefault(int bitLength) { argument
339 NativeBN.BN_generate_prime_ex(r.bignum, bitLength, false, 0, 0);
H A DPrimality.java94 if (ni.bitLength() <= 10) {
109 // j = startPoint.bitLength();
H A DConversion.java76 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 DBitLevel.java40 /** @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/support/src/test/java/libcore/javax/net/ssl/
H A DRandomPrivateKeyX509ExtendedKeyManager.java58 int keyLengthBits = originalKeySpec.getModulus().bitLength();
/libcore/ojluni/src/main/java/java/text/
H A DNumberFormat.java212 * {@link java.math.BigInteger#bitLength() bit length} of less than 64,
241 ((BigInteger)number).bitLength() < 64)) {
H A DDecimalFormat.java631 ((BigInteger)number).bitLength () < 64)) {
/libcore/luni/src/main/native/
H A Djava_math_NativeBN.cpp555 NATIVE_METHOD(NativeBN, bitLength, "(J)I"),
/libcore/ojluni/src/main/java/java/time/
H A DDuration.java999 if (divRem[0].bitLength() > 63) {
/libcore/luni/src/test/java/libcore/java/security/
H A DSignatureTest.java2914 final int oneTooBig = RSA_2048_modulus.bitLength() - 10;
2936 final int oneTooBig = RSA_2048_modulus.bitLength() - 10;
2959 final int oneTooBig = RSA_2048_modulus.bitLength() + 1;
2981 final int tooBig = RSA_2048_modulus.bitLength() * 2;

Completed in 317 milliseconds