summaryrefslogtreecommitdiffstats
path: root/openssl/src/main/java
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 /openssl/src/main/java
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 'openssl/src/main/java')
-rw-r--r--openssl/src/main/java/org/openssl/NativeBN.java3
1 files changed, 0 insertions, 3 deletions
diff --git a/openssl/src/main/java/org/openssl/NativeBN.java b/openssl/src/main/java/org/openssl/NativeBN.java
index 44464e0..3597e3c 100644
--- a/openssl/src/main/java/org/openssl/NativeBN.java
+++ b/openssl/src/main/java/org/openssl/NativeBN.java
@@ -79,9 +79,6 @@ public class NativeBN {
public static native int[] bn2litEndInts(int a, int[] to);
- public static native byte[] bn2twosComp(int a, byte[] to);
-
-
public static native int sign(int a);
// Returns -1, 0, 1 AND NOT boolean.
// #define BN_is_negative(a) ((a)->neg != 0)