History log of /libcore/luni/src/main/native/java_math_NativeBN.cpp
Revision Date Author Comments
33fc9556dfda6298fcd7c119f68a7375e13cbed9 28-Dec-2015 Richard Uhler <ruhler@google.com> Introduce NativeAllocationRegistry API.

The NativeAllocationRegistry API provides a way to associate native
allocations with Java objects. The native allocations will
automatically be freed when the correspondong Java object becomes
unreachable.

Use NativeAllocationRegistry for BigInt.

Bug: 23130675
Change-Id: If89dc03f0668afdecf1086280d16d2803e07a62a
b3aacde3d8af759ee4a7b395c636ea360547d92d 05-Nov-2014 Ian Rogers <irogers@google.com> Move from UniquePtr to std::unique_ptr.

Switch from stlport to libcxx as stlport lacks std::unique_ptr.

Change-Id: I45a3588a8ecf4689521f1df6654ed279a6d0669e
8383f343119f7a98cbe3b4a5bddc89038ac5c166 04-Sep-2014 Adam Langley <agl@google.com> Make libcore compile with BoringSSL.

NativeBN_putULongInt was cleaned up because of a slightly worrying mix
of signed and unsigned ints, and because of an unneeded preprocessor
test. However, as I look down the rest of the file, there's a lot of it
but I didn't get to fixing it all up.

Bug: 17409664
Change-Id: If0adde83bebf04e7e3be163c1b30ebef75a67d05
Signed-off-by: Adam Langley <agl@google.com>
6bc20cd8fc6784a75158d8f1db27802a12b28f94 28-Apr-2014 Serguei Katkov <serguei.i.katkov@intel.com> Fix BN to use correct size of array

NativeBN_litEndInts2bn uses len as a size of the generated array
while it should be wlen for 64-bit.

This will fix the following BigIntegerTest cases:
- BigIntegerTest#test_Constructor_ILjava_util_Random
- BigIntegerTest#test_hashCode

Change-Id: Ife98d11cf94cd5568e55163f98fc4fe3de9d3918
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Reported-by: Marcus Oakland <marcus.oakland@arm.com>
1d6c936ab01da702aab6c7e578e2c74cdc90b8a4 18-Mar-2014 Kenny Root <kroot@google.com> NativeBN: use bn_correct_top on negative BN

If you use BN_bin2bn, it will call bn_correct_top for you. However,
since this code is poking into the structure of the BIGNUM itself
without using API, we must call it ourselves.

Before the test_negativeValues_superfluousZeroes would fail with this
confusing error:

libcore.java.math.BigIntegerTest#test_negativeValues_superfluousZeros
junit.framework.AssertionFailedError: expected -1374707309 but was -1374707309
at junit.framework.Assert.assertEquals(Assert.java:99)
at libcore.java.math.BigIntegerTest.test_negativeValues_superfluousZeros(BigIntegerTest.java:171)

Bug: 12761797
Change-Id: I724c1313e4febca8ce2bda9d10f9b5ebde96a6b1
a961d0b42b313aae32f340d9bf7de18e638da2cb 25-Jan-2014 Colin Cross <ccross@android.com> Update BN to work when sizeof(BN_ULONG) != 4.

Change-Id: Ifc1cdf17c7198624c217afc82c43819b71660d53
55c4a2d6d69636840512eaaa009d22ebecc605e6 07-Sep-2013 Elliott Hughes <enh@google.com> Remove StaticAssert.h.

The switch to C++11 means we have static_assert now.

Change-Id: Iaa39af8c4fa7143fc83fda550543eb3270f9f161
0a08bbe70ef43ed29cba241e95aa5c338349b021 30-May-2013 Chris Dearman <chris.dearman@imgtec.com> Use correct signature for NativeBN_BN_is_prime_ex

Change-Id: Ic08c4142542c5bd28e964a22270beed13297b9d6
66e740b765384686ce87003608412e940ab5d489 24-Apr-2013 Elliott Hughes <enh@google.com> Simplify NativeBN error handling.

Change-Id: I150459cf71da6a3232c281d82c1ef7cbf1b2a2bc
a125dded8ab0490d05e2fa9ec2e821ef1ae6facd 23-Apr-2013 Elliott Hughes <enh@google.com> 64-bit fixes for BigInteger.

I fear this is just the start for this code. There seem to be a lot
of assumptions about the types used by OpenSSL that may not hold for
a 64-bit build.

Change-Id: I05c276ff06adc66c1e7878196ce1afd5fba290d9
7cd6760f7045d771faae8080a8c6150bf678f679 04-May-2012 Elliott Hughes <enh@google.com> Make libjavacore independent of libnativehelper for the PDK.

Bug: 6369821
Change-Id: Ie038571a5dac1f301c0c3c6fb84df432e67b62c0
ce1396eb6e63e3dd785f5052dd77aab1a2d4af7c 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: If68c0a933417163908aa05cebffd2863b581d7c8
57d0a10f4fa6cae6d5c63b4f799e048e83c5d11e 03-Mar-2011 Elliott Hughes <enh@google.com> Make all filenames match their classes.

Change-Id: I2c9f95a27ee3881fc609e3e4f1468205c701215d