In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/99111b894a3d385cc1a6057abf20c35e849caaa8?hp=5c3085ee8edac26825ef44056ea5aba97493d7ab>

- Log -----------------------------------------------------------------
commit 99111b894a3d385cc1a6057abf20c35e849caaa8
Author: Yves Orton <demer...@gmail.com>
Date:   Thu Jun 1 15:06:44 2017 +0200

    Restore "improve and update hash algorithm configuration docs in INSTALL"
    
    This reverts commit 9627bf7af087e000c169b623f1a4536976a0f6c1,
    and 2b2e489d8a432b3526cb21ef651bb9101ecd5b9d, which were reverts
    of commit e7e07d980872d020fd93a43cda96f72c8013af20 and of commit
    c25b844905729021ec43dcc6c244d99330d7260a resepctively.
    
    Updated docs to reflect new hash functions, along with some wordsmithing
    tweaks to make things read more smoothly (hopefully).

M       INSTALL
M       zaphod32_hash.h

commit 1a237f4f1aacd4c0b9606acf0685f746f7c70528
Author: Yves Orton <demer...@gmail.com>
Date:   Thu Jun 1 15:04:26 2017 +0200

    Restore "get rid of USE_HASH_SEED_EXPLICIT"
    
    This reverts commit eba287cb48b881ee252ec418246375010c97a85b,
    which was a revert of dd1b95f812312c85390f487887cdd55282fcd6ce.
    
    As far as I know USE_HASH_SEED_EXPLICIT been outright broken for a long
    time, and it doesnt make any sense since mandatory randomization anyway,
    so simply remove it.

M       hv_func.h
M       perl.c
M       perl.h
M       util.c

commit 1c4b2386d9e49f946664295ac003573dea41155e
Author: Yves Orton <demer...@gmail.com>
Date:   Thu Jun 1 15:02:27 2017 +0200

    Restore "Move utility macros to their own file"
    
    This reverts commit 3f023586c2fbf826d45cf78795361337eca3daa1,
    which was a revert of commit 259e968485f855f70472c8be9267efceca42b0fb.
    
    After this patch hv_func.h is left with only logic relating to
    selecting and configuring the hash function we use, not the utility macros
    (such as ROTL and equivalent) our hash functions use and share.

M       MANIFEST
M       hv_func.h
A       hv_macro.h

commit 9d5e3f1aaa70db4a786eb6a7a3437e1e1d703204
Author: Yves Orton <demer...@gmail.com>
Date:   Thu Jun 1 15:00:13 2017 +0200

    Restore "Add new hashing and "hash with state" infrastructure"
    
    This reverts commit e6a172f358c0f48c4b744dbd5e9ef6ff0b4ff289,
    which was a revert of a3bf60fbb1f05cd2c69d4ff0a2ef99537afdaba7.
    
    Add new hashing and "hash with state" infrastructure
    
    This adds support for three new hash functions: StadtX, Zaphod32 and SBOX,
    and reworks some of our hash internals infrastructure to do so.
    
    SBOX is special in that it is designed to be used in conjuction with any
    other hash function for hashing short strings very efficiently and very
    securely. It features compile time options on how much memory and startup
    time are traded off to control the length of keys that SBOX hashes.
    
    This also adds support for caching the hash values of single byte characters
    which can be used in conjuction with any other hash, including SBOX, 
although
    SBOX itself is as fast as the lookup cache, so typically you wouldnt use 
both
    at the same time.
    
    This also *removes* support for Jenkins One-At-A-Time. It has served us
    well, but it's day is done.
    
    This patch adds three new files: zaphod32_hash.h, stadtx_hash.h,
    sbox32_hash.h

M       MANIFEST
M       embedvar.h
M       hv_func.h
M       perl.c
M       perlapi.h
M       perlvars.h
A       sbox32_hash.h
A       stadtx_hash.h
M       t/porting/globvar.t
A       zaphod32_hash.h

commit 6f019ba79e7ec30ad81de6ad4cce78b8f8f9ba91
Author: Yves Orton <demer...@gmail.com>
Date:   Thu Jun 1 14:56:12 2017 +0200

    Restore "Tweak our hash bucket splitting rules"
    
    This reverts commit e4343ef32499562ce956ba3cb9cf4454d5d2ff7f,
    which was a revert of 05f97de032fe95cabe8c9f6d6c0a5897b1616194.
    
    Prior to this patch we resized hashes when after inserting a key
    the load factor of the hash reached 1 (load factor= keys / buckets).
    
    This patch makes two subtle changes to this logic:
    
    1. We split only after inserting a key into an utilized bucket,
    2. and the maximum load factor exceeds 0.667
    
    The intent and effect of this change is to increase our hash tables
    efficiency. Reducing the maximum load factor 0.667 means that we should
    have much less keys in collision overall, at the cost of some unutilized
    space (2/3rds was chosen as it is easier to calculate than 0.7). On the
    other hand, only splitting after a collision means in theory that we execute
    the "final split" less often. Additionally, insertin a key into an unused
    bucket increases the efficiency of the hash, without changing the worst
    case.[1] In other words without increasing collisions we use the space
    in our hashes more efficiently.
    
    A side effect of this hash is that the size of a hash is more sensitive
    to key insert order. A set of keys with some collisions might be one
    size if those collisions were encountered early, or another if they were
    encountered later. Assuming random distribution of hash values about
    50% of hashes should be smaller than they would be without this rule.
    
    The two changes complement each other, as changing the maximum load
    factor decreases the chance of a collision, but changing to only split
    after a collision means that we won't waste as much of that space we
    might.
    
    [1] Since I personally didnt find this obvious at first here is my
    explanation:
    
    The old behavior was that we doubled the number of buckets when the
    number of keys in the hash matched that of buckets. So on inserting
    the Kth key into a K bucket hash, we would double the number of
    buckets.  Thus the worse case prior to this patch was a hash
    containing K-1 keys which all hash into a single  bucket, and the post
    split worst case behavior would be having K items in a single bucket
    of a hash with 2*K buckets total.
    
    The new behavior says that we double the size of the hash once inserting
    an item into an occupied bucket and after doing so we exceeed the maximum
    load factor (leave aside the change in maximum load factor in this patch).
    If we insert into an occupied bucket (including the worse case bucket) then
    we trigger a key split, and we have exactly the same cases as before.
    If we insert into an empty bucket then we now have a worst case of K-1 items
    in one bucket, and 1 item in another, in a hash with K buckets, thus the
    worst case has not changed.

M       ext/Hash-Util/t/Util.t
M       ext/Hash-Util/t/builtin.t
M       hv.c
M       t/op/coreamp.t
M       t/op/hash.t
M       t/op/sub_lval.t

commit 4d8c782364ae966f53263102f1850382d4aeef7a
Author: Yves Orton <demer...@gmail.com>
Date:   Thu Jun 1 14:54:36 2017 +0200

    Restore "use a specific define for 64 bit hashing"
    
    This reverts commit 63e6b12834233dc9b98f2b7b63611f958aa88cc6,
    which was a revert of a4283faf7092ec370914ee3e4e7afeddd0115689.

M       hv_func.h

commit 2c2da8e7f0f6325fab643997a536072633fa0cf8
Author: Yves Orton <demer...@gmail.com>
Date:   Thu Jun 1 14:51:44 2017 +0200

    Fix #131190 - UTF8 code improperly casting negative integer to U8 in 
comparison
    
    This reverts commit b4972372a75776de3c9e6bd234a398d103677316,
    effectively restoring commit ca7eb79a236b41b7722c6800527f95cd76843eed,
    and commit 85fde2b7c3f5631fd982f5db735b84dc9224bec0.

M       regexec.c
-----------------------------------------------------------------------

Summary of changes:
 INSTALL                   |   91 ++-
 MANIFEST                  |    4 +
 embedvar.h                |    4 +
 ext/Hash-Util/t/Util.t    |    4 +-
 ext/Hash-Util/t/builtin.t |   10 +-
 hv.c                      |   43 +-
 hv_func.h                 |  430 ++++-------
 hv_macro.h                |   81 +++
 perl.c                    |   56 +-
 perl.h                    |   12 +-
 perlapi.h                 |    4 +
 perlvars.h                |    6 +
 regexec.c                 |    1 +
 sbox32_hash.h             | 1777 +++++++++++++++++++++++++++++++++++++++++++++
 stadtx_hash.h             |  301 ++++++++
 t/op/coreamp.t            |    2 +-
 t/op/hash.t               |   21 +-
 t/op/sub_lval.t           |    2 +-
 t/porting/globvar.t       |    2 +-
 util.c                    |    4 +-
 zaphod32_hash.h           |  285 ++++++++
 21 files changed, 2775 insertions(+), 365 deletions(-)
 create mode 100644 hv_macro.h
 create mode 100644 sbox32_hash.h
 create mode 100644 stadtx_hash.h
 create mode 100644 zaphod32_hash.h

diff --git a/INSTALL b/INSTALL
index 7b528ea282..1059508522 100644
--- a/INSTALL
+++ b/INSTALL
@@ -366,58 +366,79 @@ symbols during configure. An example might be:
 B<Unless stated otherwise these options are considered experimental or
 insecure and are not recommended for production use.>
 
-Perl 5.18 includes support for multiple hash functions, and changed
-the default (to ONE_AT_A_TIME_HARD), you can choose a different
-algorithm by defining one of the following symbols. Note that as of
-Perl 5.18 we can only recommend use of the default or SIPHASH. All
-the others are known to have security issues and are for research
-purposes only.
+Since Perl 5.18 we have included support for multiple hash functions,
+although from time to time we change which functions we support,
+and which function is default (currently SBOX+STADTX on 64 bit builds
+and SBOX+ZAPHOD32 for 32 bit builds). You can choose a different
+algorithm by defining one of the following symbols during configure.
+Note that there security implications of which hash function you choose
+to use. The functions are listed roughly by how secure they are believed
+to be, with the one believed to be most secure at release time being 
PERL_HASH_FUNC_SIPHASH.
 
     PERL_HASH_FUNC_SIPHASH
-    PERL_HASH_FUNC_SDBM
-    PERL_HASH_FUNC_DJB2
-    PERL_HASH_FUNC_SUPERFAST
-    PERL_HASH_FUNC_MURMUR3
-    PERL_HASH_FUNC_ONE_AT_A_TIME
-    PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
-    PERL_HASH_FUNC_ONE_AT_A_TIME_OLD
-
-Perl 5.18 randomizes the order returned by keys(), values(), and each(),
-and allows controlling this behavior by using of the PERL_PERTURB_KEYS
-option. You can disable this option entirely with the define:
+    PERL_HASH_FUNC_SIPHASH13
+    PERL_HASH_FUNC_ZAPHOD32
+    PERL_HASH_FUNC_STADTX
+
+In addition, these, (or custom hash functions), may be "fronted" by the
+SBOX32 hash function for keys under a chosen size. This hash function is
+special in that it has proven theoretical security properties, and is very
+fast to hash, but which by nature is restricted to a maximum key length,
+and which has rather expensive setup costs (relatively speaking), both in
+terms of performance and more importantly in terms of memory. SBOX32
+requires 1k of storage per character it can hash, and it must populate that
+storage with 256 32-bit random values as well. In practice the RNG we use
+for seeding the SBOX32 storage is very efficient and populating the table
+required for hashing even fairly long keys is negligble as we only do it
+during startup. By default we build with SBOX32 enabled, but you change that
+by setting
+
+   PERL_HASH_USE_SBOX32_ALSO
+
+to zero in configure. By default Perl will use SBOX32 to hash strings 24 bytes
+or shorter, you can change this length by setting
+
+    SBOX32_MAX_LEN
+
+to the desired length, with the maximum length being 256.
+
+As of Perl 5.18 the order returned by keys(), values(), and each() is
+non-deterministic and distinct per hash, and the insert order for
+colliding keys is randomized as well, and perl allows for controlling this
+by the PERL_PERTURB_KEYS environment setting. You can disable this behavior
+entirely with the define
 
     PERL_PERTURB_KEYS_DISABLED
 
-You can disable the environment variable checks and specify the type of
-key traversal randomization to be used by defining one of these:
+You can disable the environment variable checks and compile time specify
+the type of key traversal randomization to be used by defining one of these:
 
     PERL_PERTURB_KEYS_RANDOM
     PERL_PERTURB_KEYS_DETERMINISTIC
 
-In Perl 5.18 the seed used for the hash function is randomly selected
-at process start which can be overridden by specifying a seed by setting
+Since Perl 5.18 the seed used for the hash function is randomly selected
+at process start, which can be overridden by specifying a seed by setting
 the PERL_HASH_SEED environment variable.
 
-You can change this behavior by building perl with the
-
-   USE_HASH_SEED_EXPLICIT
-
-define, in which case one has to explicitly set the PERL_HASH_SEED
-environment variable to enable the security feature or by adding
+You can change this behavior so that your perl is built with a hard coded
+seed with the define
 
     NO_HASH_SEED
 
-to the compilation flags to completely disable the randomisation feature.
-Note these modes are poorly tested, insecure and not recommended.
+Note that if you do this you should modify the code in hv_func.h to specify
+your own key. In the future this define may be renamed and replaced with one
+that requires you to specify the key to use.
 
-B<Perl has never guaranteed any ordering of the hash keys>, and the
+B<NOTE WELL: Perl has never guaranteed any ordering of the hash keys>, and the
 ordering has already changed several times during the lifetime of Perl
 5.  Also, the ordering of hash keys has always been, and continues to
-be, affected by the insertion order.  Note that because of this
-randomisation for example the Data::Dumper results will be different
-between different runs of Perl, since Data::Dumper by default dumps
-hashes "unordered".  The use of the Data::Dumper C<Sortkeys> option is
-recommended.
+be, affected by the insertion order regardless of whether you build with
+or without the randomization features.  Note that because of this
+and especially with randomization that the key order of a hash is *undefined*
+and that things like Data::Dumper, for example, may produce different output
+between different runs of Perl, since Data::Dumper serializes the key in the
+native order for the hash.  The use of the Data::Dumper C<Sortkeys> option is
+recommended if you are comparing dumps between different invocations of perl.
 
 See L<perlrun/PERL_HASH_SEED> and L<perlrun/PERL_PERTURB_KEYS> for
 details on the environment variables, and L<perlsec/Algorithmic
diff --git a/MANIFEST b/MANIFEST
index 7dd0cbff18..0d61af0062 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4448,6 +4448,7 @@ hints/vos.sh                      Hints for named 
architecture
 hv.c                           Hash value code
 hv.h                           Hash value header
 hv_func.h                      Hash value static inline function header
+hv_macro.h                     Macros used by hv_func.h
 inline.h                       Static inline functions
 INSTALL                                Detailed installation instructions
 install_lib.pl                 functions shared between install* scripts
@@ -5200,8 +5201,10 @@ regexp.h                 Public declarations for the 
above
 regnodes.h                     Description of nodes of RE engine
 run.c                          The interpreter loop
 runtests.SH                    A script that generates runtests
+sbox32_hash.h                  SBox hash code (32 Bit SBOX based hash function)
 scope.c                                Scope entry and exit code
 scope.h                                Scope entry and exit header
+stadtx_hash.h                  StadtX hash code (64 Bit fast hash function)
 sv.c                           Scalar value code
 sv.h                           Scalar value header
 symbian/bld.inf                        Symbian sample app build config
@@ -6020,3 +6023,4 @@ win32/wince.h                     WinCE port
 win32/wincesck.c               WinCE port
 write_buildcustomize.pl                Generate lib/buildcustomize.pl
 XSUB.h                         Include file for extension subroutines
+zaphod32_hash.h                        Zaphod32 hash code (32 bit fast hash 
function)
diff --git a/embedvar.h b/embedvar.h
index e8cab91e6f..1e3f9a2ed9 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -384,10 +384,14 @@
 #define PL_Gdollarzero_mutex   (my_vars->Gdollarzero_mutex)
 #define PL_fold_locale         (my_vars->Gfold_locale)
 #define PL_Gfold_locale                (my_vars->Gfold_locale)
+#define PL_hash_chars          (my_vars->Ghash_chars)
+#define PL_Ghash_chars         (my_vars->Ghash_chars)
 #define PL_hash_seed           (my_vars->Ghash_seed)
 #define PL_Ghash_seed          (my_vars->Ghash_seed)
 #define PL_hash_seed_set       (my_vars->Ghash_seed_set)
 #define PL_Ghash_seed_set      (my_vars->Ghash_seed_set)
+#define PL_hash_state          (my_vars->Ghash_state)
+#define PL_Ghash_state         (my_vars->Ghash_state)
 #define PL_hints_mutex         (my_vars->Ghints_mutex)
 #define PL_Ghints_mutex                (my_vars->Ghints_mutex)
 #define PL_keyword_plugin      (my_vars->Gkeyword_plugin)
diff --git a/ext/Hash-Util/t/Util.t b/ext/Hash-Util/t/Util.t
index 4a12fd1764..c52a8e4b88 100644
--- a/ext/Hash-Util/t/Util.t
+++ b/ext/Hash-Util/t/Util.t
@@ -606,9 +606,9 @@ ok(defined($hash_seed) && $hash_seed ne '', "hash_seed 
$hash_seed");
     my $array1= bucket_array({});
     my $array2= bucket_array({1..10});
     is("@info1","0 8 0");
-    is("@info2[0,1]","5 8");
+    like("@info2[0,1]",qr/5 (?:8|16)/);
     is("@stats1","0 8 0");
-    is("@stats2[0,1]","5 8");
+    like("@stats2[0,1]",qr/5 (?:8|16)/);
     my @keys1= sort map { ref $_ ? @$_ : () } @$array1;
     my @keys2= sort map { ref $_ ? @$_ : () } @$array2;
     is("@keys1","");
diff --git a/ext/Hash-Util/t/builtin.t b/ext/Hash-Util/t/builtin.t
index 3654c9bc1a..0705f84206 100644
--- a/ext/Hash-Util/t/builtin.t
+++ b/ext/Hash-Util/t/builtin.t
@@ -26,13 +26,15 @@ is(used_buckets(%hash), 1, "hash should have one used 
buckets");
 
 $hash{$_}= $_ for 2..7;
 
-like(bucket_ratio(%hash), qr!/8!, "hash has expected number of buckets in 
bucket_ratio");
-is(num_buckets(%hash), 8, "hash should have eight buckets");
+like(bucket_ratio(%hash), qr!/(?:8|16)!, "hash has expected number of buckets 
in bucket_ratio");
+my $num= num_buckets(%hash);
+ok(($num == 8 || $num == 16), "hash should have 8 or 16 buckets");
 cmp_ok(used_buckets(%hash), "<", 8, "hash should have one used buckets");
 
 $hash{8}= 8;
-like(bucket_ratio(%hash), qr!/16!, "hash has expected number of buckets in 
bucket_ratio");
-is(num_buckets(%hash), 16, "hash should have sixteen buckets");
+like(bucket_ratio(%hash), qr!/(?:8|16)!, "hash has expected number of buckets 
in bucket_ratio");
+$num= num_buckets(%hash);
+ok(($num == 8 || $num == 16), "hash should have 8 or 16 buckets");
 cmp_ok(used_buckets(%hash), "<=", 8, "hash should have at most 8 used 
buckets");
 
 
diff --git a/hv.c b/hv.c
index 85e42d13e0..3bd62c6f9d 100644
--- a/hv.c
+++ b/hv.c
@@ -34,7 +34,11 @@ holds the key and hash value.
 #define PERL_HASH_INTERNAL_ACCESS
 #include "perl.h"
 
-#define DO_HSPLIT(xhv) ((xhv)->xhv_keys > (xhv)->xhv_max) /* HvTOTALKEYS(hv) > 
HvMAX(hv) */
+/* we split when we collide and we have a load factor over 0.667.
+ * NOTE if you change this formula so we split earlier than previously
+ * you MUST change the logic in hv_ksplit()
+ */
+#define DO_HSPLIT(xhv) ( ((xhv)->xhv_keys + ((xhv)->xhv_keys >> 1))  > 
(xhv)->xhv_max )
 #define HV_FILL_THRESHOLD 31
 
 static const char S_strtab_error[]
@@ -343,6 +347,7 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, 
STRLEN klen,
     HE **oentry;
     SV *sv;
     bool is_utf8;
+    bool in_collision;
     int masked_flags;
     const int return_svp = action & HV_FETCH_JUST_SV;
     HEK *keysv_hek = NULL;
@@ -835,6 +840,7 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, 
STRLEN klen,
      * making it harder to see if there is a collision. We also
      * reset the iterator randomizer if there is one.
      */
+    in_collision = *oentry != NULL;
     if ( *oentry && PL_HASH_RAND_BITS_ENABLED) {
         PL_hash_rand_bits++;
         PL_hash_rand_bits= ROTL_UV(PL_hash_rand_bits,1);
@@ -877,7 +883,7 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, 
STRLEN klen,
        HvHASKFLAGS_on(hv);
 
     xhv->xhv_keys++; /* HvTOTALKEYS(hv)++ */
-    if ( DO_HSPLIT(xhv) ) {
+    if ( in_collision && DO_HSPLIT(xhv) ) {
         const STRLEN oldsize = xhv->xhv_max + 1;
         const U32 items = (U32)HvPLACEHOLDERS_get(hv);
 
@@ -1450,29 +1456,42 @@ void
 Perl_hv_ksplit(pTHX_ HV *hv, IV newmax)
 {
     XPVHV* xhv = (XPVHV*)SvANY(hv);
-    const I32 oldsize = (I32) xhv->xhv_max+1; /* HvMAX(hv)+1 (sick) */
+    const I32 oldsize = (I32) xhv->xhv_max+1;       /* HvMAX(hv)+1 */
     I32 newsize;
+    I32 wantsize;
+    I32 trysize;
     char *a;
 
     PERL_ARGS_ASSERT_HV_KSPLIT;
 
-    newsize = (I32) newmax;                    /* possible truncation here */
-    if (newsize != newmax || newmax <= oldsize)
+    wantsize = (I32) newmax;                            /* possible truncation 
here */
+    if (wantsize != newmax)
        return;
-    while ((newsize & (1 + ~newsize)) != newsize) {
-       newsize &= ~(newsize & (1 + ~newsize)); /* get proper power of 2 */
+
+    wantsize= wantsize + (wantsize >> 1);           /* wantsize *= 1.5 */
+    if (wantsize < newmax)                          /* overflow detection */
+        return;
+
+    newsize = oldsize;
+    while (wantsize > newsize) {
+        trysize = newsize << 1;
+        if (trysize > newsize) {
+            newsize = trysize;
+        } else {
+            /* we overflowed */
+            return;
+        }
     }
-    if (newsize < newmax)
-       newsize *= 2;
-    if (newsize < newmax)
-       return;                                 /* overflow detection */
+
+    if (newsize <= oldsize)
+        return;                                            /* overflow 
detection */
 
     a = (char *) HvARRAY(hv);
     if (a) {
         hsplit(hv, oldsize, newsize);
     } else {
         Newxz(a, PERL_HV_ARRAY_ALLOC_BYTES(newsize), char);
-        xhv->xhv_max = --newsize;
+        xhv->xhv_max = newsize - 1;
         HvARRAY(hv) = (HE **) a;
     }
 }
diff --git a/hv_func.h b/hv_func.h
index d10b5e1d5e..e091c86b0f 100644
--- a/hv_func.h
+++ b/hv_func.h
@@ -4,144 +4,155 @@
  * to avoid "algorithmic complexity attacks".
  *
  * If USE_HASH_SEED is defined, hash randomisation is done by default
- * If USE_HASH_SEED_EXPLICIT is defined, hash randomisation is done
- * only if the environment variable PERL_HASH_SEED is set.
  * (see also perl.c:perl_parse() and S_init_tls_and_interp() and 
util.c:get_hash_seed())
  */
-
 #ifndef PERL_SEEN_HV_FUNC_H /* compile once */
 #define PERL_SEEN_HV_FUNC_H
+#include "hv_macro.h"
 
 #if !( 0 \
         || defined(PERL_HASH_FUNC_SIPHASH) \
         || defined(PERL_HASH_FUNC_SIPHASH13) \
-        || defined(PERL_HASH_FUNC_HYBRID_OAATHU_SIPHASH13) \
-        || defined(PERL_HASH_FUNC_ONE_AT_A_TIME_HARD) \
+        || defined(PERL_HASH_FUNC_STADTX) \
+        || defined(PERL_HASH_FUNC_ZAPHOD32) \
     )
-#if IVSIZE == 8
-#define PERL_HASH_FUNC_HYBRID_OAATHU_SIPHASH13
-#else
-#define PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
+#   ifdef CAN64BITHASH
+#       define PERL_HASH_FUNC_STADTX
+#   else
+#       define PERL_HASH_FUNC_ZAPHOD32
+#   endif
 #endif
+
+#ifndef PERL_HASH_USE_SBOX32_ALSO
+#define PERL_HASH_USE_SBOX32_ALSO 1
+#endif
+
+#ifndef SBOX32_MAX_LEN
+#define SBOX32_MAX_LEN 24
 #endif
 
+/* this must be after the SBOX32_MAX_LEN define */
+#include "sbox32_hash.h"
+
 #if defined(PERL_HASH_FUNC_SIPHASH)
-#   define PERL_HASH_FUNC "SIPHASH_2_4"
-#   define PERL_HASH_SEED_BYTES 16
-#   define PERL_HASH_WITH_SEED(seed,hash,str,len) (hash)= 
S_perl_hash_siphash_2_4((seed),(U8*)(str),(len))
+# define __PERL_HASH_FUNC "SIPHASH_2_4"
+# define __PERL_HASH_SEED_BYTES 16
+# define __PERL_HASH_STATE_BYTES 32
+# define __PERL_HASH_SEED_STATE(seed,state) 
S_perl_siphash_seed_state(seed,state)
+# define __PERL_HASH_WITH_STATE(state,str,len) 
S_perl_hash_siphash_2_4_with_state((state),(U8*)(str),(len))
 #elif defined(PERL_HASH_FUNC_SIPHASH13)
-#   define PERL_HASH_FUNC "SIPHASH_1_3"
-#   define PERL_HASH_SEED_BYTES 16
-#   define PERL_HASH_WITH_SEED(seed,hash,str,len) (hash)= 
S_perl_hash_siphash_1_3((seed),(U8*)(str),(len))
-#elif defined(PERL_HASH_FUNC_HYBRID_OAATHU_SIPHASH13)
-#   define PERL_HASH_FUNC "HYBRID_OAATHU_SIPHASH_1_3"
-#   define PERL_HASH_SEED_BYTES 24
-#   define PERL_HASH_WITH_SEED(seed,hash,str,len) (hash)= 
S_perl_hash_oaathu_siphash_1_3((seed),(U8*)(str),(len))
-#elif defined(PERL_HASH_FUNC_ONE_AT_A_TIME_HARD)
-#   define PERL_HASH_FUNC "ONE_AT_A_TIME_HARD"
-#   define PERL_HASH_SEED_BYTES 8
-#   define PERL_HASH_WITH_SEED(seed,hash,str,len) (hash)= 
S_perl_hash_one_at_a_time_hard((seed),(U8*)(str),(len))
+# define __PERL_HASH_FUNC "SIPHASH_1_3"
+# define __PERL_HASH_SEED_BYTES 16
+# define __PERL_HASH_STATE_BYTES 32
+# define __PERL_HASH_SEED_STATE(seed,state) 
S_perl_siphash_seed_state(seed,state)
+# define __PERL_HASH_WITH_STATE(state,str,len) 
S_perl_hash_siphash_1_3_with_state((state),(U8*)(str),(len))
+#elif defined(PERL_HASH_FUNC_STADTX)
+# define __PERL_HASH_FUNC "STATDX"
+# define __PERL_HASH_SEED_BYTES 16
+# define __PERL_HASH_STATE_BYTES 32
+# define __PERL_HASH_SEED_STATE(seed,state) stadtx_seed_state(seed,state)
+# define __PERL_HASH_WITH_STATE(state,str,len) 
(U32)stadtx_hash_with_state((state),(U8*)(str),(len))
+# include "stadtx_hash.h"
+#elif defined(PERL_HASH_FUNC_ZAPHOD32)
+# define __PERL_HASH_FUNC "ZAPHOD32"
+# define __PERL_HASH_SEED_BYTES 12
+# define __PERL_HASH_STATE_BYTES 12
+# define __PERL_HASH_SEED_STATE(seed,state) zaphod32_seed_state(seed,state)
+# define __PERL_HASH_WITH_STATE(state,str,len) 
(U32)zaphod32_hash_with_state((state),(U8*)(str),(len))
+# include "zaphod32_hash.h"
 #endif
 
-#ifndef PERL_HASH_WITH_SEED
+#ifndef __PERL_HASH_WITH_STATE
 #error "No hash function defined!"
 #endif
-#ifndef PERL_HASH_SEED_BYTES
-#error "PERL_HASH_SEED_BYTES not defined"
+#ifndef __PERL_HASH_SEED_BYTES
+#error "__PERL_HASH_SEED_BYTES not defined"
 #endif
-#ifndef PERL_HASH_FUNC
-#error "PERL_HASH_FUNC not defined"
+#ifndef __PERL_HASH_FUNC
+#error "__PERL_HASH_FUNC not defined"
 #endif
 
-#ifndef PERL_HASH_SEED
-#   if defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT)
-#       define PERL_HASH_SEED PL_hash_seed
-#   elif PERL_HASH_SEED_BYTES == 4
-#       define PERL_HASH_SEED ((const U8 *)"PeRl")
-#   elif PERL_HASH_SEED_BYTES == 8
-#       define PERL_HASH_SEED ((const U8 *)"PeRlHaSh")
-#   elif PERL_HASH_SEED_BYTES == 16
-#       define PERL_HASH_SEED ((const U8 *)"PeRlHaShhAcKpErl")
-#   else
-#       error "No PERL_HASH_SEED definition for " PERL_HASH_FUNC
-#   endif
-#endif
 
-#define PERL_HASH(hash,str,len) 
PERL_HASH_WITH_SEED(PERL_HASH_SEED,hash,str,len)
+#if PERL_HASH_USE_SBOX32_ALSO == 1
+# define _PERL_HASH_FUNC                        __PERL_HASH_FUNC
+# define _PERL_HASH_SEED_BYTES                  __PERL_HASH_SEED_BYTES
+# define _PERL_HASH_STATE_BYTES                 __PERL_HASH_STATE_BYTES
+# define _PERL_HASH_SEED_STATE(seed,state)      
__PERL_HASH_SEED_STATE(seed,state)
+# define _PERL_HASH_WITH_STATE(state,str,len)   
__PERL_HASH_WITH_STATE(state,str,len)
+#else
 
-/* legacy - only mod_perl should be doing this.  */
-#ifdef PERL_HASH_INTERNAL_ACCESS
-#define PERL_HASH_INTERNAL(hash,str,len) PERL_HASH(hash,str,len)
-#endif
+#define _PERL_HASH_FUNC         "SBOX32_WITH_" __PERL_HASH_FUNC
 
-/*-----------------------------------------------------------------------------
- * Endianess, misalignment capabilities and util macros
- *
- * The following 3 macros are defined in this section. The other macros defined
- * are only needed to help derive these 3.
- *
- * U8TO32_LE(x)   Read a little endian unsigned 32-bit int
- * UNALIGNED_SAFE   Defined if unaligned access is safe
- * ROTL32(x,r)      Rotate x left by r bits
- */
+#define _PERL_HASH_SEED_BYTES   ( __PERL_HASH_SEED_BYTES + ( 3 * sizeof(U32) ) 
)
 
-#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
-  || defined(_MSC_VER) || defined (__TURBOC__)
-#define U8TO16_LE(d) (*((const U16 *) (d)))
-#endif
+#define _PERL_HASH_STATE_BYTES  \
+    ( __PERL_HASH_SEED_BYTES + ( ( 1 + ( 256 * SBOX32_MAX_LEN ) ) * 
sizeof(U32) ) )
 
-#if !defined (U8TO16_LE)
-#define U8TO16_LE(d) ((((const U8 *)(d))[1] << 8)\
-                      +((const U8 *)(d))[0])
-#endif
+#define _PERL_HASH_SEED_STATE(seed,state) STMT_START {                         
             \
+    __PERL_HASH_SEED_STATE(seed,state);                                        
             \
+    sbox32_seed_state96(seed + __PERL_HASH_SEED_BYTES , state + 
__PERL_HASH_STATE_BYTES);   \
+} STMT_END
 
-#if (BYTEORDER == 0x1234 || BYTEORDER == 0x12345678) && U32SIZE == 4
-  /* CPU endian matches murmurhash algorithm, so read 32-bit word directly */
-  #define U8TO32_LE(ptr)   (*((const U32*)(ptr)))
-#elif BYTEORDER == 0x4321 || BYTEORDER == 0x87654321
-  /* TODO: Add additional cases below where a compiler provided bswap32 is 
available */
-  #if defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3))
-    #define U8TO32_LE(ptr)   (__builtin_bswap32(*((U32*)(ptr))))
-  #else
-    /* Without a known fast bswap32 we're just as well off doing this */
-    #define U8TO32_LE(ptr)   (ptr[0]|ptr[1]<<8|ptr[2]<<16|ptr[3]<<24)
-    #define UNALIGNED_SAFE
-  #endif
-#else
-  /* Unknown endianess so last resort is to read individual bytes */
-  #define U8TO32_LE(ptr)   (ptr[0]|ptr[1]<<8|ptr[2]<<16|ptr[3]<<24)
-  /* Since we're not doing word-reads we can skip the messing about with 
realignment */
-  #define UNALIGNED_SAFE
-#endif
+#define _PERL_HASH_WITH_STATE(state,str,len)                                   
             \
+    ((len <= SBOX32_MAX_LEN)                                                   
             \
+        ? sbox32_hash_with_state((state + 
__PERL_HASH_STATE_BYTES),(U8*)(str),(len))        \
+        : __PERL_HASH_WITH_STATE((state),(str),(len)))
 
-#ifdef HAS_QUAD
-#ifndef U64TYPE
-/* This probably isn't going to work, but failing with a compiler error due to
-   lack of uint64_t is no worse than failing right now with an #error.  */
-#define U64 uint64_t
-#endif
 #endif
 
-/* Find best way to ROTL32/ROTL64 */
-#if defined(_MSC_VER)
-  #include <stdlib.h>  /* Microsoft put _rotl declaration in here */
-  #define ROTL32(x,r)  _rotl(x,r)
-  #ifdef HAS_QUAD
-    #define ROTL64(x,r)  _rotl64(x,r)
-  #endif
+PERL_STATIC_INLINE
+U32 S_perl_hash_with_seed(const U8 * const seed, const U8 * const str, const 
STRLEN len)
+{
+    U8 state[_PERL_HASH_STATE_BYTES];
+    _PERL_HASH_SEED_STATE(seed,state);
+    return _PERL_HASH_WITH_STATE(state,str,len);
+}
+
+#define PERL_HASH_WITH_SEED(seed,hash,str,len) \
+    (hash) = S_perl_hash_with_seed(seed,str,len)
+#define PERL_HASH_WITH_STATE(state,hash,str,len) \
+    (hash) = _PERL_HASH_WITH_STATE((state),(U8*)(str),(len))
+#define PERL_HASH_SEED_STATE(seed,state) _PERL_HASH_SEED_STATE(seed,state)
+#define PERL_HASH_SEED_BYTES _PERL_HASH_SEED_BYTES
+#define PERL_HASH_STATE_BYTES _PERL_HASH_STATE_BYTES
+#define PERL_HASH_FUNC        _PERL_HASH_FUNC
+
+#ifdef PERL_USE_SINGLE_CHAR_HASH_CACHE
+#define PERL_HASH(state,str,len) \
+    (hash) = ((len) < 2 ? ( (len) == 0 ? PL_hash_chars[256] : 
PL_hash_chars[(U8)(str)[0]] ) \
+                       : _PERL_HASH_WITH_STATE(PL_hash_state,(U8*)(str),(len)))
 #else
-  /* gcc recognises this code and generates a rotate instruction for CPUs with 
one */
-  #define ROTL32(x,r)  (((U32)x << r) | ((U32)x >> (32 - r)))
-  #ifdef HAS_QUAD
-    #define ROTL64(x,r)  (((U64)x << r) | ((U64)x >> (64 - r)))
-  #endif
+#define PERL_HASH(hash,str,len) \
+    PERL_HASH_WITH_STATE(PL_hash_state,hash,(U8*)(str),(len))
 #endif
 
+/* Setup the hash seed, either we do things dynamically at start up,
+ * including reading from the environment, or we randomly setup the
+ * seed. The seed will be passed into the PERL_HASH_SEED_STATE() function
+ * defined for the configuration defined for this perl, which will then
+ * initialze whatever state it might need later in hashing. */
 
-#ifdef UV_IS_QUAD
-#define ROTL_UV(x,r) ROTL64(x,r)
-#else
-#define ROTL_UV(x,r) ROTL32(x,r)
+#ifndef PERL_HASH_SEED
+#   if defined(USE_HASH_SEED)
+#       define PERL_HASH_SEED PL_hash_seed
+#   else
+       /* this is a 512 bit seed, which should be more than enough for the
+        * configuration of any of our hash functions (with or without sbox).
+        * If you actually use a hard coded seed, you are strongly encouraged
+        * to replace this with something else of the correct length
+        * for the hash function you are using (24-32 bytes depending on build
+        * options). Repeat, you are *STRONGLY* encouraged not to use the value
+        * provided here.
+        */
+#       define PERL_HASH_SEED \
+           ((const U8 *)"A long string of pseudorandomly "  \
+                        "chosen bytes for hashing in Perl")
+#   endif
+#endif
+
+/* legacy - only mod_perl should be doing this.  */
+#ifdef PERL_HASH_INTERNAL_ACCESS
+#define PERL_HASH_INTERNAL(hash,str,len) PERL_HASH(hash,str,len)
 #endif
 
 /* This is SipHash by Jean-Philippe Aumasson and Daniel J. Bernstein.
@@ -158,17 +169,7 @@
  * It is 64 bit only.
  */
 
-#ifdef HAS_QUAD
-
-#define U8TO64_LE(p) \
-  (((U64)((p)[0])      ) | \
-   ((U64)((p)[1]) <<  8) | \
-   ((U64)((p)[2]) << 16) | \
-   ((U64)((p)[3]) << 24) | \
-   ((U64)((p)[4]) << 32) | \
-   ((U64)((p)[5]) << 40) | \
-   ((U64)((p)[6]) << 48) | \
-   ((U64)((p)[7]) << 56))
+#ifdef CAN64BITHASH
 
 #define SIPROUND            \
   STMT_START {              \
@@ -178,30 +179,37 @@
     v2 += v1; v1=ROTL64(v1,17); v1 ^= v2; v2=ROTL64(v2,32); \
   } STMT_END
 
-/* SipHash-2-4 */
-
+#define SIPHASH_SEED_STATE(key,v0,v1,v2,v3) \
+do {                                    \
+    v0 = v2 = U8TO64_LE(key + 0);       \
+    v1 = v3 = U8TO64_LE(key + 8);       \
+  /* "somepseudorandomlygeneratedbytes" */  \
+    v0 ^= 0x736f6d6570736575ull;        \
+    v1 ^= 0x646f72616e646f6dull;        \
+    v2 ^= 0x6c7967656e657261ull;        \
+    v3 ^= 0x7465646279746573ull;        \
+} while (0)
+
+PERL_STATIC_INLINE
+void S_perl_siphash_seed_state(const unsigned char * const seed_buf, unsigned 
char * state_buf) {
+    U64 *v= (U64*) state_buf;
+    SIPHASH_SEED_STATE(seed_buf, v[0],v[1],v[2],v[3]);
+}
 
 #define PERL_SIPHASH_FNC(FNC,SIP_ROUNDS,SIP_FINAL_ROUNDS) \
 PERL_STATIC_INLINE U32 \
-FNC(const unsigned char * const seed, const unsigned char *in, const STRLEN 
inlen) { \
-  /* "somepseudorandomlygeneratedbytes" */  \
-  U64 v0 = UINT64_C(0x736f6d6570736575);    \
-  U64 v1 = UINT64_C(0x646f72616e646f6d);    \
-  U64 v2 = UINT64_C(0x6c7967656e657261);    \
-  U64 v3 = UINT64_C(0x7465646279746573);    \
-                                            \
-  U64 b;                                    \
-  U64 k0 = ((const U64*)seed)[0];           \
-  U64 k1 = ((const U64*)seed)[1];           \
-  U64 m;                                    \
+FNC ## _with_state \
+  (const unsigned char * const state, const unsigned char *in, const STRLEN 
inlen) \
+{                                           \
   const int left = inlen & 7;               \
   const U8 *end = in + inlen - left;        \
                                             \
-  b = ( ( U64 )(inlen) ) << 56;             \
-  v3 ^= k1;                                 \
-  v2 ^= k0;                                 \
-  v1 ^= k1;                                 \
-  v0 ^= k0;                                 \
+  U64 b = ( ( U64 )(inlen) ) << 56;         \
+  U64 m;                                    \
+  U64 v0 = U8TO64_LE(state);                \
+  U64 v1 = U8TO64_LE(state+8);              \
+  U64 v2 = U8TO64_LE(state+16);             \
+  U64 v3 = U8TO64_LE(state+24);             \
                                             \
   for ( ; in != end; in += 8 )              \
   {                                         \
@@ -237,8 +245,17 @@ FNC(const unsigned char * const seed, const unsigned char 
*in, const STRLEN inle
                                             \
   b = v0 ^ v1 ^ v2  ^ v3;                   \
   return (U32)(b & U32_MAX);                \
+}                                           \
+                                            \
+PERL_STATIC_INLINE U32                      \
+FNC (const unsigned char * const seed, const unsigned char *in, const STRLEN 
inlen) \
+{                                                                   \
+    U64 state[4];                                                   \
+    SIPHASH_SEED_STATE(seed,state[0],state[1],state[2],state[3]);   \
+    return FNC ## _with_state((U8*)state,in,inlen);                 \
 }
 
+
 PERL_SIPHASH_FNC(
     S_perl_hash_siphash_1_3
     ,SIPROUND;
@@ -250,152 +267,7 @@ PERL_SIPHASH_FNC(
     ,SIPROUND;SIPROUND;
     ,SIPROUND;SIPROUND;SIPROUND;SIPROUND;
 )
-
-#endif /* defined(HAS_QUAD) */
-
-/* - ONE_AT_A_TIME_HARD is the 5.17+ recommend ONE_AT_A_TIME variant */
-
-/* This is derived from the "One-at-a-Time" algorithm by Bob Jenkins
- * from requirements by Colin Plumb.
- * (http://burtleburtle.net/bob/hash/doobs.html)
- * Modified by Yves Orton to increase security for Perl 5.17 and later.
- */
-PERL_STATIC_INLINE U32
-S_perl_hash_one_at_a_time_hard(const unsigned char * const seed, const 
unsigned char *str, const STRLEN len) {
-    const unsigned char * const end = (const unsigned char *)str + len;
-    U32 hash = *((const U32*)seed) + (U32)len;
-    
-    while (str < end) {
-        hash += (hash << 10);
-        hash ^= (hash >> 6);
-        hash += *str++;
-    }
-    
-    hash += (hash << 10);
-    hash ^= (hash >> 6);
-    hash += seed[4];
-    
-    hash += (hash << 10);
-    hash ^= (hash >> 6);
-    hash += seed[5];
-    
-    hash += (hash << 10);
-    hash ^= (hash >> 6);
-    hash += seed[6];
-    
-    hash += (hash << 10);
-    hash ^= (hash >> 6);
-    hash += seed[7];
-    
-    hash += (hash << 10);
-    hash ^= (hash >> 6);
-
-    hash += (hash << 3);
-    hash ^= (hash >> 11);
-    return (hash + (hash << 15));
-}
-
-#ifdef HAS_QUAD
-
-/* Hybrid hash function
- *
- * For short strings, 16 bytes or shorter, we use an optimised variant
- * of One At A Time Hard, and for longer strings, we use siphash_1_3.
- *
- * The optimisation of One At A Time Hard means we read the key in
- * reverse from normal, but by doing so we avoid the loop overhead.
- */
-PERL_STATIC_INLINE U32
-S_perl_hash_oaathu_siphash_1_3(const unsigned char * const seed, const 
unsigned char *str, const STRLEN len) {
-    U32 hash = *((const U32*)seed) + (U32)len;
-    switch (len) {
-        case 16:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[15];
-        case 15:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[14];
-        case 14:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[13];
-        case 13:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[12];
-        case 12:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[11];
-        case 11:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[10];
-        case 10:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[9];
-        case 9:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[8];
-        case 8:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[7];
-        case 7:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[6];
-        case 6:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[5];
-        case 5:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[4];
-        case 4:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[3];
-        case 3:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[2];
-        case 2:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[1];
-        case 1:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += str[0];
-        case 0:
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += seed[4];
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += seed[5];
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += seed[6];
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-            hash += seed[7];
-            hash += (hash << 10);
-            hash ^= (hash >> 6);
-
-            hash += (hash << 3);
-            hash ^= (hash >> 11);
-            return (hash + (hash << 15));
-    }
-    return S_perl_hash_siphash_1_3(seed+8, str, len);
-}
-#endif /* defined(HAS_QUAD) */
+#endif /* defined(CAN64BITHASH) */
 
 
 #endif /*compile once*/
diff --git a/hv_macro.h b/hv_macro.h
new file mode 100644
index 0000000000..77a4c84896
--- /dev/null
+++ b/hv_macro.h
@@ -0,0 +1,81 @@
+#ifndef PERL_SEEN_HV_MACRO_H /* compile once */
+#define PERL_SEEN_HV_MACRO_H
+
+#if IVSIZE == 8
+#define CAN64BITHASH
+#endif
+
+/*-----------------------------------------------------------------------------
+ * Endianess, misalignment capabilities and util macros
+ *
+ * The following 3 macros are defined in this section. The other macros defined
+ * are only needed to help derive these 3.
+ *
+ * U8TO16_LE(x)   Read a little endian unsigned 32-bit int
+ * U8TO32_LE(x)   Read a little endian unsigned 32-bit int
+ * U8TO28_LE(x)   Read a little endian unsigned 32-bit int
+ * ROTL32(x,r)      Rotate x left by r bits
+ * ROTL64(x,r)      Rotate x left by r bits
+ * ROTR32(x,r)      Rotate x right by r bits
+ * ROTR64(x,r)      Rotate x right by r bits
+ */
+
+#ifndef U32_ALIGNMENT_REQUIRED
+  #if (BYTEORDER == 0x1234 || BYTEORDER == 0x12345678)
+    #define U8TO16_LE(ptr)   (*((const U16*)(ptr)))
+    #define U8TO32_LE(ptr)   (*((const U32*)(ptr)))
+    #define U8TO64_LE(ptr)   (*((const U64*)(ptr)))
+  #elif (BYTEORDER == 0x4321 || BYTEORDER == 0x87654321)
+    #if defined(__GNUC__) && (__GNUC__>4 || (__GNUC__==4 && __GNUC_MINOR__>=3))
+      #define U8TO16_LE(ptr)   (__builtin_bswap16(*((U16*)(ptr))))
+      #define U8TO32_LE(ptr)   (__builtin_bswap32(*((U32*)(ptr))))
+      #define U8TO64_LE(ptr)   (__builtin_bswap64(*((U64*)(ptr))))
+    #endif
+  #endif
+#endif
+
+#ifndef U8TO16_LE
+    /* Without a known fast bswap32 we're just as well off doing this */
+  #define U8TO16_LE(ptr)   ((U32)(ptr)[0]|(U32)(ptr)[1]<<8)
+  #define U8TO32_LE(ptr)   
((U32)(ptr)[0]|(U32)(ptr)[1]<<8|(U32)(ptr)[2]<<16|(U32)(ptr)[3]<<24)
+  #define U8TO64_LE(ptr)   
((U64)(ptr)[0]|(U64)(ptr)[1]<<8|(U64)(ptr)[2]<<16|(U64)(ptr)[3]<<24|\
+                            (U64)(ptr)[4]<<32|(U64)(ptr)[5]<<40|\
+                            (U64)(ptr)[6]<<48|(U64)(ptr)[7]<<56)
+#endif
+
+#ifdef CAN64BITHASH
+  #ifndef U64TYPE
+  /* This probably isn't going to work, but failing with a compiler error due 
to
+   lack of uint64_t is no worse than failing right now with an #error.  */
+  #define U64 uint64_t
+  #endif
+#endif
+
+/* Find best way to ROTL32/ROTL64 */
+#if defined(_MSC_VER)
+  #include <stdlib.h>  /* Microsoft put _rotl declaration in here */
+  #define ROTL32(x,r)  _rotl(x,r)
+  #define ROTR32(x,r)  _rotr(x,r)
+  #define ROTL64(x,r)  _rotl64(x,r)
+  #define ROTR64(x,r)  _rotr64(x,r)
+#else
+  /* gcc recognises this code and generates a rotate instruction for CPUs with 
one */
+  #define ROTL32(x,r)  (((U32)(x) << (r)) | ((U32)(x) >> (32 - (r))))
+  #define ROTR32(x,r)  (((U32)(x) << (32 - (r))) | ((U32)(x) >> (r)))
+  #define ROTL64(x,r)  ( ( (U64)(x) << (r) ) | ( (U64)(x) >> ( 64 - (r) ) ) )
+  #define ROTR64(x,r)  ( ( (U64)(x) << ( 64 - (r) ) ) | ( (U64)(x) >> (r) ) )
+#endif
+
+
+#ifdef UV_IS_QUAD
+#define ROTL_UV(x,r) ROTL64(x,r)
+#define ROTR_UV(x,r) ROTL64(x,r)
+#else
+#define ROTL_UV(x,r) ROTL32(x,r)
+#define ROTR_UV(x,r) ROTR32(x,r)
+#endif
+#if IVSIZE == 8
+#define CAN64BITHASH
+#endif
+
+#endif
diff --git a/perl.c b/perl.c
index 658f260997..d7b0866dd0 100644
--- a/perl.c
+++ b/perl.c
@@ -308,27 +308,54 @@ perl_construct(pTHXx)
 #ifdef USE_REENTRANT_API
     Perl_reentrant_init(aTHX);
 #endif
-#if defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT)
-        /* [perl #22371] Algorimic Complexity Attack on Perl 5.6.1, 5.8.0
-         * This MUST be done before any hash stores or fetches take place.
-         * If you set PL_hash_seed (and presumably also PL_hash_seed_set)
-         * yourself, it is your responsibility to provide a good random seed!
-         * You can also define PERL_HASH_SEED in compile time, see hv.h.
-         *
-         * XXX: fix this comment */
     if (PL_hash_seed_set == FALSE) {
+        /* Initialize the hash seed and state at startup. This must be
+         * done very early, before ANY hashes are constructed, and once
+         * setup is fixed for the lifetime of the process.
+         *
+         * If you decide to disable the seeding process you should choose
+         * a suitable seed yourself and define PERL_HASH_SEED to a well chosen
+         * string. See hv_func.h for details.
+         */
+#if defined(USE_HASH_SEED)
+        /* get the hash seed from the environment or from an RNG */
         Perl_get_hash_seed(aTHX_ PL_hash_seed);
+#else
+        /* they want a hard coded seed, check that it is long enough */
+        assert( strlen(PERL_HASH_SEED) >= PERL_HASH_SEED_BYTES );
+#endif
+
+        /* now we use the chosen seed to initialize the state -
+         * in some configurations this may be a relatively speaking
+         * expensive operation, but we only have to do it once at startup */
+        PERL_HASH_SEED_STATE(PERL_HASH_SEED,PL_hash_state);
+
+#ifdef PERL_USE_SINGLE_CHAR_HASH_CACHE
+        /* we can build a special cache for 0/1 byte keys, if people choose
+         * I suspect most of the time it is not worth it */
+        {
+            char str[2]="\0";
+            int i;
+            for (i=0;i<256;i++) {
+                str[0]= i;
+                PERL_HASH_WITH_STATE(PL_hash_state,PL_hash_chars[i],str,1);
+            }
+            PERL_HASH_WITH_STATE(PL_hash_state,PL_hash_chars[256],str,0);
+        }
+#endif
+        /* at this point we have initialezed the hash function, and we can 
start
+         * constructing hashes */
         PL_hash_seed_set= TRUE;
     }
-#endif /* #if defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT) */
-
     /* Note that strtab is a rather special HV.  Assumptions are made
        about not iterating on it, and not adding tie magic to it.
        It is properly deallocated in perl_destruct() */
     PL_strtab = newHV();
 
+    /* SHAREKEYS tells us that the hash has its keys shared with PL_strtab,
+     * which is not the case with PL_strtab itself */
     HvSHAREKEYS_off(PL_strtab);                        /* mandatory */
-    hv_ksplit(PL_strtab, 512);
+    hv_ksplit(PL_strtab, 1 << 11);
 
     Zero(PL_sv_consts, SV_CONSTS_COUNT, SV*);
 
@@ -1537,7 +1564,7 @@ perl_parse(pTHXx_ XSINIT_t xsinit, int argc, char **argv, 
char **env)
 #ifndef MULTIPLICITY
     PERL_UNUSED_ARG(my_perl);
 #endif
-#if (defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT) || 
defined(USE_HASH_SEED_DEBUG)) && !defined(NO_PERL_HASH_SEED_DEBUG)
+#if (defined(USE_HASH_SEED) || defined(USE_HASH_SEED_DEBUG)) && 
!defined(NO_PERL_HASH_SEED_DEBUG)
     {
         const char * const s = PerlEnv_getenv("PERL_HASH_SEED_DEBUG");
 
@@ -1556,7 +1583,7 @@ perl_parse(pTHXx_ XSINIT_t xsinit, int argc, char **argv, 
char **env)
             PerlIO_printf(Perl_debug_log, "\n");
         }
     }
-#endif /* #if (defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT) ... */
+#endif /* #if (defined(USE_HASH_SEED) ... */
 
 #ifdef __amigaos4__
     {
@@ -1842,9 +1869,6 @@ S_Internals_V(pTHX_ CV *cv)
 #  ifdef USE_FAST_STDIO
                             " USE_FAST_STDIO"
 #  endif              
-#  ifdef USE_HASH_SEED_EXPLICIT
-                            " USE_HASH_SEED_EXPLICIT"
-#  endif
 #  ifdef USE_LOCALE
                             " USE_LOCALE"
 #  endif
diff --git a/perl.h b/perl.h
index 979e213459..ee98d40f07 100644
--- a/perl.h
+++ b/perl.h
@@ -3891,12 +3891,12 @@ typedef        struct crypt_data {     /* straight from 
/usr/include/crypt.h */
 #endif
 
 /* [perl #22371] Algorimic Complexity Attack on Perl 5.6.1, 5.8.0.
- * Note that the USE_HASH_SEED and USE_HASH_SEED_EXPLICIT are *NOT*
- * defined by Configure, despite their names being similar to the
- * other defines like USE_ITHREADS.  Configure in fact knows nothing
- * about the randomised hashes.  Therefore to enable/disable the hash
- * randomisation defines use the Configure -Accflags=... instead. */
-#if !defined(NO_HASH_SEED) && !defined(USE_HASH_SEED) && 
!defined(USE_HASH_SEED_EXPLICIT)
+ * Note that the USE_HASH_SEED and similar defines are *NOT* defined by
+ * Configure, despite their names being similar to other defines like
+ * USE_ITHREADS.  Configure in fact knows nothing about the randomised
+ * hashes.  Therefore to enable/disable the hash randomisation defines
+ * use the Configure -Accflags=... instead. */
+#if !defined(NO_HASH_SEED) && !defined(USE_HASH_SEED)
 #  define USE_HASH_SEED
 #endif
 
diff --git a/perlapi.h b/perlapi.h
index 91f50eb2b0..af0c2d593b 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -117,10 +117,14 @@ END_EXTERN_C
 #define PL_dollarzero_mutex    (*Perl_Gdollarzero_mutex_ptr(NULL))
 #undef  PL_fold_locale
 #define PL_fold_locale         (*Perl_Gfold_locale_ptr(NULL))
+#undef  PL_hash_chars
+#define PL_hash_chars          (*Perl_Ghash_chars_ptr(NULL))
 #undef  PL_hash_seed
 #define PL_hash_seed           (*Perl_Ghash_seed_ptr(NULL))
 #undef  PL_hash_seed_set
 #define PL_hash_seed_set       (*Perl_Ghash_seed_set_ptr(NULL))
+#undef  PL_hash_state
+#define PL_hash_state          (*Perl_Ghash_state_ptr(NULL))
 #undef  PL_hints_mutex
 #define PL_hints_mutex         (*Perl_Ghints_mutex_ptr(NULL))
 #undef  PL_keyword_plugin
diff --git a/perlvars.h b/perlvars.h
index 884d57c504..bdc8467902 100644
--- a/perlvars.h
+++ b/perlvars.h
@@ -248,6 +248,12 @@ PERLVAR(G, malloc_mutex, perl_mutex)       /* Mutex for 
malloc */
 
 PERLVARI(G, hash_seed_set, bool, FALSE)        /* perl.c */
 PERLVARA(G, hash_seed, PERL_HASH_SEED_BYTES, unsigned char) /* perl.c and hv.h 
*/
+#if defined(PERL_HASH_STATE_BYTES)
+PERLVARA(G, hash_state, PERL_HASH_STATE_BYTES, unsigned char) /* perl.c and 
hv.h */
+#endif
+#if defined(PERL_USE_SINGLE_CHAR_HASH_CACHE)
+PERLVARA(G, hash_chars, (1+256) * sizeof(U32), unsigned char) /* perl.c and 
hv.h */
+#endif
 
 /* The path separator can vary depending on whether we're running under DCL or
  * a Unix shell.
diff --git a/regexec.c b/regexec.c
index 82128a7edc..35b88d7ece 100644
--- a/regexec.c
+++ b/regexec.c
@@ -5593,6 +5593,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, 
regnode *prog)
                 if (scan->flags == EXACTL || scan->flags == EXACTFLU8) {
                     _CHECK_AND_WARN_PROBLEMATIC_LOCALE;
                     if (utf8_target
+                        && nextchr >= 0 /* guard against negative EOS value in 
nextchr */
                         && UTF8_IS_ABOVE_LATIN1(nextchr)
                         && scan->flags == EXACTL)
                     {
diff --git a/sbox32_hash.h b/sbox32_hash.h
new file mode 100644
index 0000000000..9c98195899
--- /dev/null
+++ b/sbox32_hash.h
@@ -0,0 +1,1777 @@
+#ifndef DEBUG_SBOX32_HASH
+#define DEBUG_SBOX32_HASH 0
+
+#include "zaphod32_hash.h"
+
+#if DEBUG_SBOX32_HASH == 1
+#include <stdio.h>
+#define SBOX32_WARN6(pat,v0,v1,v2,v3,v4,v5)    printf(pat, v0, v1, v2, v3, v4, 
v5)
+#define SBOX32_WARN5(pat,v0,v1,v2,v3,v4)       printf(pat, v0, v1, v2, v3, v4)
+#define SBOX32_WARN4(pat,v0,v1,v2,v3)          printf(pat, v0, v1, v2, v3)
+#define SBOX32_WARN3(pat,v0,v1,v2)             printf(pat, v0, v1, v2)
+#define SBOX32_WARN2(pat,v0,v1)                printf(pat, v0, v1)
+#define NOTE3(pat,v0,v1,v2)             printf(pat, v0, v1, v2)
+#elif DEBUG_SBOX32_HASH == 2
+#define SBOX32_WARN6(pat,v0,v1,v2,v3,v4,v5)
+#define SBOX32_WARN5(pat,v0,v1,v2,v3,v4)
+#define SBOX32_WARN4(pat,v0,v1,v2,v3)
+#define SBOX32_WARN3(pat,v0,v1,v2)
+#define SBOX32_WARN2(pat,v0,v1)
+#define NOTE3(pat,v0,v1,v2)             printf(pat, v0, v1, v2)
+#else
+#define SBOX32_WARN6(pat,v0,v1,v2,v3,v4,v5)
+#define SBOX32_WARN5(pat,v0,v1,v2,v3,v4)
+#define SBOX32_WARN4(pat,v0,v1,v2,v3)
+#define SBOX32_WARN3(pat,v0,v1,v2)
+#define NOTE3(pat,v0,v1,v2)
+#define SBOX32_WARN2(pat,v0,v1)
+#endif
+
+#ifndef PERL_SEEN_HV_FUNC_H
+#if !defined(U32) 
+    #include <stdint.h>
+    #define U32 uint32_t
+#endif
+
+#if !defined(U8)
+    #define U8 unsigned char
+#endif
+
+#if !defined(U16)
+    #define U16 uint16_t
+#endif
+
+#ifndef STRLEN
+#define STRLEN int
+#endif
+#endif
+
+#ifndef SBOX32_STATIC_INLINE
+#ifdef PERL_STATIC_INLINE
+#define SBOX32_STATIC_INLINE PERL_STATIC_INLINE
+#else
+#define SBOX32_STATIC_INLINE static inline
+#endif
+#endif
+
+#ifndef STMT_START
+#define STMT_START do
+#define STMT_END while(0)
+#endif
+
+#ifndef U8TO32_LE
+#define U8TO32_LE(ptr)  (*((const U32 *)(ptr)))
+#endif
+#ifndef U8TO16_LE
+#define U8TO16_LE(ptr)  (*((const U16 *)(ptr)))
+#endif
+
+#ifndef SBOX32_MAX_LEN
+#define SBOX32_MAX_LEN 256
+#endif
+
+#ifndef SBOX32_STATE_WORDS
+#define SBOX32_STATE_WORDS (1 + (SBOX32_MAX_LEN * 256))
+#define SBOX32_STATE_BYTES (SBOX32_STATE_WORDS * sizeof(U32))
+#define SBOX32_STATE_BITS (SBOX32_STATE_BYTES * 8)
+#endif
+
+#define SBOX32_MIX4(v0,v1,v2,v3,text) STMT_START { \
+        SBOX32_WARN5("v0=%08x v1=%08x v2=%08x v3=%08x - SBOX32_MIX4 %s\n", \
+                            (unsigned int)v0, (unsigned int)v1,    \
+                            (unsigned int)v2, (unsigned int)v3, text);   \
+        v0 = ROTL32(v0,13) - v3;    \
+        v1 ^= v2;                   \
+        v3 = ROTL32(v3, 9) + v1;    \
+        v2 ^= v0;                   \
+        v0 = ROTL32(v0,14) ^ v3;    \
+        v1 = ROTL32(v1,25) - v2;    \
+        v3 ^= v1;                   \
+        v2 = ROTL32(v2, 4) - v0;    \
+} STMT_END
+
+#define SBOX32_MIX3(v0,v1,v2,text) STMT_START {                               \
+    SBOX32_WARN4("v0=%08x v1=%08x v2=%08x - SBOX32_MIX3 %s\n",              \
+            (unsigned int)v0,(unsigned int)v1,(unsigned int)v2, text );     \
+    v0 = ROTL32(v0,16) - v2;   \
+    v1 = ROTR32(v1,13) ^ v2;   \
+    v2 = ROTL32(v2,17) + v1;   \
+    v0 = ROTR32(v0, 2) + v1;   \
+    v1 = ROTR32(v1,17) - v0;   \
+    v2 = ROTR32(v2, 7) ^ v0;   \
+} STMT_END
+
+#if SBOX32_MAX_LEN > 256
+#error "SBOX32_MAX_LEN is set too high!"
+#elif SBOX32_MAX_LEN == 256
+#define case_256_SBOX32(hash,state,key) _SBOX32_CASE(256,hash,state,key)
+#else
+#define case_256_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 255
+#define case_255_SBOX32(hash,state,key) _SBOX32_CASE(255,hash,state,key)
+#else
+#define case_255_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 254
+#define case_254_SBOX32(hash,state,key) _SBOX32_CASE(254,hash,state,key)
+#else
+#define case_254_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 253
+#define case_253_SBOX32(hash,state,key) _SBOX32_CASE(253,hash,state,key)
+#else
+#define case_253_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 252
+#define case_252_SBOX32(hash,state,key) _SBOX32_CASE(252,hash,state,key)
+#else
+#define case_252_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 251
+#define case_251_SBOX32(hash,state,key) _SBOX32_CASE(251,hash,state,key)
+#else
+#define case_251_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 250
+#define case_250_SBOX32(hash,state,key) _SBOX32_CASE(250,hash,state,key)
+#else
+#define case_250_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 249
+#define case_249_SBOX32(hash,state,key) _SBOX32_CASE(249,hash,state,key)
+#else
+#define case_249_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 248
+#define case_248_SBOX32(hash,state,key) _SBOX32_CASE(248,hash,state,key)
+#else
+#define case_248_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 247
+#define case_247_SBOX32(hash,state,key) _SBOX32_CASE(247,hash,state,key)
+#else
+#define case_247_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 246
+#define case_246_SBOX32(hash,state,key) _SBOX32_CASE(246,hash,state,key)
+#else
+#define case_246_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 245
+#define case_245_SBOX32(hash,state,key) _SBOX32_CASE(245,hash,state,key)
+#else
+#define case_245_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 244
+#define case_244_SBOX32(hash,state,key) _SBOX32_CASE(244,hash,state,key)
+#else
+#define case_244_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 243
+#define case_243_SBOX32(hash,state,key) _SBOX32_CASE(243,hash,state,key)
+#else
+#define case_243_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 242
+#define case_242_SBOX32(hash,state,key) _SBOX32_CASE(242,hash,state,key)
+#else
+#define case_242_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 241
+#define case_241_SBOX32(hash,state,key) _SBOX32_CASE(241,hash,state,key)
+#else
+#define case_241_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 240
+#define case_240_SBOX32(hash,state,key) _SBOX32_CASE(240,hash,state,key)
+#else
+#define case_240_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 239
+#define case_239_SBOX32(hash,state,key) _SBOX32_CASE(239,hash,state,key)
+#else
+#define case_239_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 238
+#define case_238_SBOX32(hash,state,key) _SBOX32_CASE(238,hash,state,key)
+#else
+#define case_238_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 237
+#define case_237_SBOX32(hash,state,key) _SBOX32_CASE(237,hash,state,key)
+#else
+#define case_237_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 236
+#define case_236_SBOX32(hash,state,key) _SBOX32_CASE(236,hash,state,key)
+#else
+#define case_236_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 235
+#define case_235_SBOX32(hash,state,key) _SBOX32_CASE(235,hash,state,key)
+#else
+#define case_235_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 234
+#define case_234_SBOX32(hash,state,key) _SBOX32_CASE(234,hash,state,key)
+#else
+#define case_234_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 233
+#define case_233_SBOX32(hash,state,key) _SBOX32_CASE(233,hash,state,key)
+#else
+#define case_233_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 232
+#define case_232_SBOX32(hash,state,key) _SBOX32_CASE(232,hash,state,key)
+#else
+#define case_232_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 231
+#define case_231_SBOX32(hash,state,key) _SBOX32_CASE(231,hash,state,key)
+#else
+#define case_231_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 230
+#define case_230_SBOX32(hash,state,key) _SBOX32_CASE(230,hash,state,key)
+#else
+#define case_230_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 229
+#define case_229_SBOX32(hash,state,key) _SBOX32_CASE(229,hash,state,key)
+#else
+#define case_229_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 228
+#define case_228_SBOX32(hash,state,key) _SBOX32_CASE(228,hash,state,key)
+#else
+#define case_228_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 227
+#define case_227_SBOX32(hash,state,key) _SBOX32_CASE(227,hash,state,key)
+#else
+#define case_227_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 226
+#define case_226_SBOX32(hash,state,key) _SBOX32_CASE(226,hash,state,key)
+#else
+#define case_226_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 225
+#define case_225_SBOX32(hash,state,key) _SBOX32_CASE(225,hash,state,key)
+#else
+#define case_225_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 224
+#define case_224_SBOX32(hash,state,key) _SBOX32_CASE(224,hash,state,key)
+#else
+#define case_224_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 223
+#define case_223_SBOX32(hash,state,key) _SBOX32_CASE(223,hash,state,key)
+#else
+#define case_223_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 222
+#define case_222_SBOX32(hash,state,key) _SBOX32_CASE(222,hash,state,key)
+#else
+#define case_222_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 221
+#define case_221_SBOX32(hash,state,key) _SBOX32_CASE(221,hash,state,key)
+#else
+#define case_221_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 220
+#define case_220_SBOX32(hash,state,key) _SBOX32_CASE(220,hash,state,key)
+#else
+#define case_220_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 219
+#define case_219_SBOX32(hash,state,key) _SBOX32_CASE(219,hash,state,key)
+#else
+#define case_219_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 218
+#define case_218_SBOX32(hash,state,key) _SBOX32_CASE(218,hash,state,key)
+#else
+#define case_218_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 217
+#define case_217_SBOX32(hash,state,key) _SBOX32_CASE(217,hash,state,key)
+#else
+#define case_217_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 216
+#define case_216_SBOX32(hash,state,key) _SBOX32_CASE(216,hash,state,key)
+#else
+#define case_216_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 215
+#define case_215_SBOX32(hash,state,key) _SBOX32_CASE(215,hash,state,key)
+#else
+#define case_215_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 214
+#define case_214_SBOX32(hash,state,key) _SBOX32_CASE(214,hash,state,key)
+#else
+#define case_214_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 213
+#define case_213_SBOX32(hash,state,key) _SBOX32_CASE(213,hash,state,key)
+#else
+#define case_213_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 212
+#define case_212_SBOX32(hash,state,key) _SBOX32_CASE(212,hash,state,key)
+#else
+#define case_212_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 211
+#define case_211_SBOX32(hash,state,key) _SBOX32_CASE(211,hash,state,key)
+#else
+#define case_211_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 210
+#define case_210_SBOX32(hash,state,key) _SBOX32_CASE(210,hash,state,key)
+#else
+#define case_210_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 209
+#define case_209_SBOX32(hash,state,key) _SBOX32_CASE(209,hash,state,key)
+#else
+#define case_209_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 208
+#define case_208_SBOX32(hash,state,key) _SBOX32_CASE(208,hash,state,key)
+#else
+#define case_208_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 207
+#define case_207_SBOX32(hash,state,key) _SBOX32_CASE(207,hash,state,key)
+#else
+#define case_207_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 206
+#define case_206_SBOX32(hash,state,key) _SBOX32_CASE(206,hash,state,key)
+#else
+#define case_206_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 205
+#define case_205_SBOX32(hash,state,key) _SBOX32_CASE(205,hash,state,key)
+#else
+#define case_205_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 204
+#define case_204_SBOX32(hash,state,key) _SBOX32_CASE(204,hash,state,key)
+#else
+#define case_204_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 203
+#define case_203_SBOX32(hash,state,key) _SBOX32_CASE(203,hash,state,key)
+#else
+#define case_203_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 202
+#define case_202_SBOX32(hash,state,key) _SBOX32_CASE(202,hash,state,key)
+#else
+#define case_202_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 201
+#define case_201_SBOX32(hash,state,key) _SBOX32_CASE(201,hash,state,key)
+#else
+#define case_201_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 200
+#define case_200_SBOX32(hash,state,key) _SBOX32_CASE(200,hash,state,key)
+#else
+#define case_200_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 199
+#define case_199_SBOX32(hash,state,key) _SBOX32_CASE(199,hash,state,key)
+#else
+#define case_199_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 198
+#define case_198_SBOX32(hash,state,key) _SBOX32_CASE(198,hash,state,key)
+#else
+#define case_198_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 197
+#define case_197_SBOX32(hash,state,key) _SBOX32_CASE(197,hash,state,key)
+#else
+#define case_197_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 196
+#define case_196_SBOX32(hash,state,key) _SBOX32_CASE(196,hash,state,key)
+#else
+#define case_196_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 195
+#define case_195_SBOX32(hash,state,key) _SBOX32_CASE(195,hash,state,key)
+#else
+#define case_195_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 194
+#define case_194_SBOX32(hash,state,key) _SBOX32_CASE(194,hash,state,key)
+#else
+#define case_194_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 193
+#define case_193_SBOX32(hash,state,key) _SBOX32_CASE(193,hash,state,key)
+#else
+#define case_193_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 192
+#define case_192_SBOX32(hash,state,key) _SBOX32_CASE(192,hash,state,key)
+#else
+#define case_192_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 191
+#define case_191_SBOX32(hash,state,key) _SBOX32_CASE(191,hash,state,key)
+#else
+#define case_191_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 190
+#define case_190_SBOX32(hash,state,key) _SBOX32_CASE(190,hash,state,key)
+#else
+#define case_190_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 189
+#define case_189_SBOX32(hash,state,key) _SBOX32_CASE(189,hash,state,key)
+#else
+#define case_189_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 188
+#define case_188_SBOX32(hash,state,key) _SBOX32_CASE(188,hash,state,key)
+#else
+#define case_188_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 187
+#define case_187_SBOX32(hash,state,key) _SBOX32_CASE(187,hash,state,key)
+#else
+#define case_187_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 186
+#define case_186_SBOX32(hash,state,key) _SBOX32_CASE(186,hash,state,key)
+#else
+#define case_186_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 185
+#define case_185_SBOX32(hash,state,key) _SBOX32_CASE(185,hash,state,key)
+#else
+#define case_185_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 184
+#define case_184_SBOX32(hash,state,key) _SBOX32_CASE(184,hash,state,key)
+#else
+#define case_184_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 183
+#define case_183_SBOX32(hash,state,key) _SBOX32_CASE(183,hash,state,key)
+#else
+#define case_183_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 182
+#define case_182_SBOX32(hash,state,key) _SBOX32_CASE(182,hash,state,key)
+#else
+#define case_182_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 181
+#define case_181_SBOX32(hash,state,key) _SBOX32_CASE(181,hash,state,key)
+#else
+#define case_181_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 180
+#define case_180_SBOX32(hash,state,key) _SBOX32_CASE(180,hash,state,key)
+#else
+#define case_180_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 179
+#define case_179_SBOX32(hash,state,key) _SBOX32_CASE(179,hash,state,key)
+#else
+#define case_179_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 178
+#define case_178_SBOX32(hash,state,key) _SBOX32_CASE(178,hash,state,key)
+#else
+#define case_178_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 177
+#define case_177_SBOX32(hash,state,key) _SBOX32_CASE(177,hash,state,key)
+#else
+#define case_177_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 176
+#define case_176_SBOX32(hash,state,key) _SBOX32_CASE(176,hash,state,key)
+#else
+#define case_176_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 175
+#define case_175_SBOX32(hash,state,key) _SBOX32_CASE(175,hash,state,key)
+#else
+#define case_175_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 174
+#define case_174_SBOX32(hash,state,key) _SBOX32_CASE(174,hash,state,key)
+#else
+#define case_174_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 173
+#define case_173_SBOX32(hash,state,key) _SBOX32_CASE(173,hash,state,key)
+#else
+#define case_173_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 172
+#define case_172_SBOX32(hash,state,key) _SBOX32_CASE(172,hash,state,key)
+#else
+#define case_172_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 171
+#define case_171_SBOX32(hash,state,key) _SBOX32_CASE(171,hash,state,key)
+#else
+#define case_171_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 170
+#define case_170_SBOX32(hash,state,key) _SBOX32_CASE(170,hash,state,key)
+#else
+#define case_170_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 169
+#define case_169_SBOX32(hash,state,key) _SBOX32_CASE(169,hash,state,key)
+#else
+#define case_169_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 168
+#define case_168_SBOX32(hash,state,key) _SBOX32_CASE(168,hash,state,key)
+#else
+#define case_168_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 167
+#define case_167_SBOX32(hash,state,key) _SBOX32_CASE(167,hash,state,key)
+#else
+#define case_167_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 166
+#define case_166_SBOX32(hash,state,key) _SBOX32_CASE(166,hash,state,key)
+#else
+#define case_166_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 165
+#define case_165_SBOX32(hash,state,key) _SBOX32_CASE(165,hash,state,key)
+#else
+#define case_165_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 164
+#define case_164_SBOX32(hash,state,key) _SBOX32_CASE(164,hash,state,key)
+#else
+#define case_164_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 163
+#define case_163_SBOX32(hash,state,key) _SBOX32_CASE(163,hash,state,key)
+#else
+#define case_163_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 162
+#define case_162_SBOX32(hash,state,key) _SBOX32_CASE(162,hash,state,key)
+#else
+#define case_162_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 161
+#define case_161_SBOX32(hash,state,key) _SBOX32_CASE(161,hash,state,key)
+#else
+#define case_161_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 160
+#define case_160_SBOX32(hash,state,key) _SBOX32_CASE(160,hash,state,key)
+#else
+#define case_160_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 159
+#define case_159_SBOX32(hash,state,key) _SBOX32_CASE(159,hash,state,key)
+#else
+#define case_159_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 158
+#define case_158_SBOX32(hash,state,key) _SBOX32_CASE(158,hash,state,key)
+#else
+#define case_158_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 157
+#define case_157_SBOX32(hash,state,key) _SBOX32_CASE(157,hash,state,key)
+#else
+#define case_157_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 156
+#define case_156_SBOX32(hash,state,key) _SBOX32_CASE(156,hash,state,key)
+#else
+#define case_156_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 155
+#define case_155_SBOX32(hash,state,key) _SBOX32_CASE(155,hash,state,key)
+#else
+#define case_155_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 154
+#define case_154_SBOX32(hash,state,key) _SBOX32_CASE(154,hash,state,key)
+#else
+#define case_154_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 153
+#define case_153_SBOX32(hash,state,key) _SBOX32_CASE(153,hash,state,key)
+#else
+#define case_153_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 152
+#define case_152_SBOX32(hash,state,key) _SBOX32_CASE(152,hash,state,key)
+#else
+#define case_152_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 151
+#define case_151_SBOX32(hash,state,key) _SBOX32_CASE(151,hash,state,key)
+#else
+#define case_151_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 150
+#define case_150_SBOX32(hash,state,key) _SBOX32_CASE(150,hash,state,key)
+#else
+#define case_150_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 149
+#define case_149_SBOX32(hash,state,key) _SBOX32_CASE(149,hash,state,key)
+#else
+#define case_149_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 148
+#define case_148_SBOX32(hash,state,key) _SBOX32_CASE(148,hash,state,key)
+#else
+#define case_148_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 147
+#define case_147_SBOX32(hash,state,key) _SBOX32_CASE(147,hash,state,key)
+#else
+#define case_147_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 146
+#define case_146_SBOX32(hash,state,key) _SBOX32_CASE(146,hash,state,key)
+#else
+#define case_146_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 145
+#define case_145_SBOX32(hash,state,key) _SBOX32_CASE(145,hash,state,key)
+#else
+#define case_145_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 144
+#define case_144_SBOX32(hash,state,key) _SBOX32_CASE(144,hash,state,key)
+#else
+#define case_144_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 143
+#define case_143_SBOX32(hash,state,key) _SBOX32_CASE(143,hash,state,key)
+#else
+#define case_143_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 142
+#define case_142_SBOX32(hash,state,key) _SBOX32_CASE(142,hash,state,key)
+#else
+#define case_142_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 141
+#define case_141_SBOX32(hash,state,key) _SBOX32_CASE(141,hash,state,key)
+#else
+#define case_141_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 140
+#define case_140_SBOX32(hash,state,key) _SBOX32_CASE(140,hash,state,key)
+#else
+#define case_140_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 139
+#define case_139_SBOX32(hash,state,key) _SBOX32_CASE(139,hash,state,key)
+#else
+#define case_139_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 138
+#define case_138_SBOX32(hash,state,key) _SBOX32_CASE(138,hash,state,key)
+#else
+#define case_138_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 137
+#define case_137_SBOX32(hash,state,key) _SBOX32_CASE(137,hash,state,key)
+#else
+#define case_137_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 136
+#define case_136_SBOX32(hash,state,key) _SBOX32_CASE(136,hash,state,key)
+#else
+#define case_136_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 135
+#define case_135_SBOX32(hash,state,key) _SBOX32_CASE(135,hash,state,key)
+#else
+#define case_135_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 134
+#define case_134_SBOX32(hash,state,key) _SBOX32_CASE(134,hash,state,key)
+#else
+#define case_134_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 133
+#define case_133_SBOX32(hash,state,key) _SBOX32_CASE(133,hash,state,key)
+#else
+#define case_133_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 132
+#define case_132_SBOX32(hash,state,key) _SBOX32_CASE(132,hash,state,key)
+#else
+#define case_132_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 131
+#define case_131_SBOX32(hash,state,key) _SBOX32_CASE(131,hash,state,key)
+#else
+#define case_131_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 130
+#define case_130_SBOX32(hash,state,key) _SBOX32_CASE(130,hash,state,key)
+#else
+#define case_130_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 129
+#define case_129_SBOX32(hash,state,key) _SBOX32_CASE(129,hash,state,key)
+#else
+#define case_129_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 128
+#define case_128_SBOX32(hash,state,key) _SBOX32_CASE(128,hash,state,key)
+#else
+#define case_128_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 127
+#define case_127_SBOX32(hash,state,key) _SBOX32_CASE(127,hash,state,key)
+#else
+#define case_127_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 126
+#define case_126_SBOX32(hash,state,key) _SBOX32_CASE(126,hash,state,key)
+#else
+#define case_126_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 125
+#define case_125_SBOX32(hash,state,key) _SBOX32_CASE(125,hash,state,key)
+#else
+#define case_125_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 124
+#define case_124_SBOX32(hash,state,key) _SBOX32_CASE(124,hash,state,key)
+#else
+#define case_124_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 123
+#define case_123_SBOX32(hash,state,key) _SBOX32_CASE(123,hash,state,key)
+#else
+#define case_123_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 122
+#define case_122_SBOX32(hash,state,key) _SBOX32_CASE(122,hash,state,key)
+#else
+#define case_122_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 121
+#define case_121_SBOX32(hash,state,key) _SBOX32_CASE(121,hash,state,key)
+#else
+#define case_121_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 120
+#define case_120_SBOX32(hash,state,key) _SBOX32_CASE(120,hash,state,key)
+#else
+#define case_120_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 119
+#define case_119_SBOX32(hash,state,key) _SBOX32_CASE(119,hash,state,key)
+#else
+#define case_119_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 118
+#define case_118_SBOX32(hash,state,key) _SBOX32_CASE(118,hash,state,key)
+#else
+#define case_118_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 117
+#define case_117_SBOX32(hash,state,key) _SBOX32_CASE(117,hash,state,key)
+#else
+#define case_117_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 116
+#define case_116_SBOX32(hash,state,key) _SBOX32_CASE(116,hash,state,key)
+#else
+#define case_116_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 115
+#define case_115_SBOX32(hash,state,key) _SBOX32_CASE(115,hash,state,key)
+#else
+#define case_115_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 114
+#define case_114_SBOX32(hash,state,key) _SBOX32_CASE(114,hash,state,key)
+#else
+#define case_114_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 113
+#define case_113_SBOX32(hash,state,key) _SBOX32_CASE(113,hash,state,key)
+#else
+#define case_113_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 112
+#define case_112_SBOX32(hash,state,key) _SBOX32_CASE(112,hash,state,key)
+#else
+#define case_112_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 111
+#define case_111_SBOX32(hash,state,key) _SBOX32_CASE(111,hash,state,key)
+#else
+#define case_111_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 110
+#define case_110_SBOX32(hash,state,key) _SBOX32_CASE(110,hash,state,key)
+#else
+#define case_110_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 109
+#define case_109_SBOX32(hash,state,key) _SBOX32_CASE(109,hash,state,key)
+#else
+#define case_109_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 108
+#define case_108_SBOX32(hash,state,key) _SBOX32_CASE(108,hash,state,key)
+#else
+#define case_108_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 107
+#define case_107_SBOX32(hash,state,key) _SBOX32_CASE(107,hash,state,key)
+#else
+#define case_107_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 106
+#define case_106_SBOX32(hash,state,key) _SBOX32_CASE(106,hash,state,key)
+#else
+#define case_106_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 105
+#define case_105_SBOX32(hash,state,key) _SBOX32_CASE(105,hash,state,key)
+#else
+#define case_105_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 104
+#define case_104_SBOX32(hash,state,key) _SBOX32_CASE(104,hash,state,key)
+#else
+#define case_104_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 103
+#define case_103_SBOX32(hash,state,key) _SBOX32_CASE(103,hash,state,key)
+#else
+#define case_103_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 102
+#define case_102_SBOX32(hash,state,key) _SBOX32_CASE(102,hash,state,key)
+#else
+#define case_102_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 101
+#define case_101_SBOX32(hash,state,key) _SBOX32_CASE(101,hash,state,key)
+#else
+#define case_101_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 100
+#define case_100_SBOX32(hash,state,key) _SBOX32_CASE(100,hash,state,key)
+#else
+#define case_100_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 99
+#define case_99_SBOX32(hash,state,key) _SBOX32_CASE(99,hash,state,key)
+#else
+#define case_99_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 98
+#define case_98_SBOX32(hash,state,key) _SBOX32_CASE(98,hash,state,key)
+#else
+#define case_98_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 97
+#define case_97_SBOX32(hash,state,key) _SBOX32_CASE(97,hash,state,key)
+#else
+#define case_97_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 96
+#define case_96_SBOX32(hash,state,key) _SBOX32_CASE(96,hash,state,key)
+#else
+#define case_96_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 95
+#define case_95_SBOX32(hash,state,key) _SBOX32_CASE(95,hash,state,key)
+#else
+#define case_95_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 94
+#define case_94_SBOX32(hash,state,key) _SBOX32_CASE(94,hash,state,key)
+#else
+#define case_94_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 93
+#define case_93_SBOX32(hash,state,key) _SBOX32_CASE(93,hash,state,key)
+#else
+#define case_93_SBOX32(hash,state,key) /**/
+#endif
+#if SBOX32_MAX_LEN >= 92
**** PATCH TRUNCATED AT 2000 LINES -- 1568 NOT SHOWN ****

--
Perl5 Master Repository

Reply via email to