From 64eb78436c46c1c6eecba1093a9072ff829209c4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 10 Dec 2011 12:09:27 -0800 Subject: * mpi-patches/add-mp-hash: Rewrote mp_hash to only hash enough low-order bit material from the bignum to fill an unsigned long. We don't need to walk the entire bignum. If the low order digit of the bignum is at least as large as an unsigned long, we just take that as the hash, otherwise we take enough of the digits to fill an unsigned long. For negative numbers, we just invert the bits of the hash. * mpi-patches/add-mpi-toradix-with-case: Refreshed. * mpi-patches/fix-mult-bug: Refreshed. --- mpi-patches/add-mpi-toradix-with-case | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mpi-patches/add-mpi-toradix-with-case') diff --git a/mpi-patches/add-mpi-toradix-with-case b/mpi-patches/add-mpi-toradix-with-case index 6fe9c191..b94fdb19 100644 --- a/mpi-patches/add-mpi-toradix-with-case +++ b/mpi-patches/add-mpi-toradix-with-case @@ -1,8 +1,8 @@ Index: mpi-1.8.6/mpi.c =================================================================== ---- mpi-1.8.6.orig/mpi.c 2011-12-09 19:16:58.000000000 -0800 -+++ mpi-1.8.6/mpi.c 2011-12-09 19:19:23.000000000 -0800 -@@ -2624,9 +2624,9 @@ +--- mpi-1.8.6.orig/mpi.c 2011-12-10 12:05:35.000000000 -0800 ++++ mpi-1.8.6/mpi.c 2011-12-10 12:05:39.000000000 -0800 +@@ -2615,9 +2615,9 @@ /* }}} */ @@ -14,7 +14,7 @@ Index: mpi-1.8.6/mpi.c { int ix, pos = 0; -@@ -2657,7 +2657,7 @@ +@@ -2648,7 +2648,7 @@ } /* Generate digits, use capital letters */ @@ -23,7 +23,7 @@ Index: mpi-1.8.6/mpi.c str[pos++] = ch; } -@@ -2685,10 +2685,15 @@ +@@ -2676,10 +2676,15 @@ return MP_OKAY; @@ -42,8 +42,8 @@ Index: mpi-1.8.6/mpi.c int mp_char2value(char ch, int r) Index: mpi-1.8.6/mpi.h =================================================================== ---- mpi-1.8.6.orig/mpi.h 2011-12-09 19:16:58.000000000 -0800 -+++ mpi-1.8.6/mpi.h 2011-12-09 19:28:38.000000000 -0800 +--- mpi-1.8.6.orig/mpi.h 2011-12-10 12:05:35.000000000 -0800 ++++ mpi-1.8.6/mpi.h 2011-12-10 12:05:39.000000000 -0800 @@ -213,6 +213,7 @@ int mp_radix_size(mp_int *mp, int radix); int mp_value_radix_size(int num, int qty, int radix); -- cgit v1.2.3