summaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2009-09-10 18:24:33 -0700
committerElliott Hughes <enh@google.com>2009-09-10 18:24:33 -0700
commit611ddbe080e9436de83a47624156dba70b46d940 (patch)
treef198f8e3a7a7b7d1a1ee4193695aa4aa1e34dc14 /math
parenta6bd22ee1d45bb47c9957d3bc032db395873073a (diff)
downloadlibcore-611ddbe080e9436de83a47624156dba70b46d940.zip
libcore-611ddbe080e9436de83a47624156dba70b46d940.tar.gz
libcore-611ddbe080e9436de83a47624156dba70b46d940.tar.bz2
Remove NativeBN_bn2twosComp.
NativeBN_bn2twosComp doesn't do what it claims to: it's an exact copy of NativeBN_BN_bn2bin (observe which OpenSSL BN_ function it calls!), and -- from the OpenSSL documentation -- that function "converts the absolute value of [its argument] into big-endian form". OpenSSL doesn't actually sport any appropriate function to call here, but luckily this code isn't called anywhere, and so can be removed. (BigInteger.toByteArray -- the most likely caller of this code -- seems to do the right thing, using Java code to make a big-endian two's-complement byte[]. Likewise, the conversion from a big-endian two's-complement byte[] for the corresponding BigInteger constructor looks right too, using native code to twiddle the bits itself.)
Diffstat (limited to 'math')
-rw-r--r--math/src/main/java/java/math/BigInt.java6
1 files changed, 0 insertions, 6 deletions
diff --git a/math/src/main/java/java/math/BigInt.java b/math/src/main/java/java/math/BigInt.java
index cb7990a..581c22f 100644
--- a/math/src/main/java/java/math/BigInt.java
+++ b/math/src/main/java/java/math/BigInt.java
@@ -225,12 +225,6 @@ class BigInt
return a;
}
- public byte[] bigEndianTwosComplement() {
- byte[] a = NativeBN.bn2twosComp(this.bignum, null);
- return a;
- }
-
-
public int sign() {
return NativeBN.sign(this.bignum);
}