In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e6a172f358c0f48c4b744dbd5e9ef6ff0b4ff289?hp=85fde2b7c3f5631fd982f5db735b84dc9224bec0>

- Log -----------------------------------------------------------------
commit e6a172f358c0f48c4b744dbd5e9ef6ff0b4ff289
Author: Yves Orton <[email protected]>
Date:   Sun Apr 23 11:47:13 2017 +0200

    Revert "Add new hashing and "hash with state" infrastructure"
    
    This reverts commit a3bf60fbb1f05cd2c69d4ff0a2ef99537afdaba7.
    
    Accidentally pushed work pending unfreeze.

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

commit 3f023586c2fbf826d45cf78795361337eca3daa1
Author: Yves Orton <[email protected]>
Date:   Sun Apr 23 11:47:10 2017 +0200

    Revert "Move utility macros to their own file"
    
    This reverts commit 259e968485f855f70472c8be9267efceca42b0fb.
    
    Accidentally pushed work pending unfreeze.

M       MANIFEST
M       hv_func.h
D       hv_macro.h

commit eba287cb48b881ee252ec418246375010c97a85b
Author: Yves Orton <[email protected]>
Date:   Sun Apr 23 11:47:04 2017 +0200

    Revert "get rid of USE_HASH_SEED_EXPLICIT"
    
    This reverts commit dd1b95f812312c85390f487887cdd55282fcd6ce.
    
    Accidentally pushed work pending unfreeze.

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

commit 9627bf7af087e000c169b623f1a4536976a0f6c1
Author: Yves Orton <[email protected]>
Date:   Sun Apr 23 11:46:52 2017 +0200

    Revert "improve and update hash algorithm configuration docs in INSTALL"
    
    This reverts commit e7e07d980872d020fd93a43cda96f72c8013af20.
    
    Accidentally pushed work pending unfreeze.

M       INSTALL

commit 2b2e489d8a432b3526cb21ef651bb9101ecd5b9d
Author: Yves Orton <[email protected]>
Date:   Sun Apr 23 11:46:32 2017 +0200

    Revert "remove dead comment"
    
    This reverts commit c25b844905729021ec43dcc6c244d99330d7260a.
    
    Accidentally pushed work pending un-freeze.

M       zaphod32_hash.h
-----------------------------------------------------------------------

Summary of changes:
 INSTALL             |   91 +--
 MANIFEST            |    4 -
 embedvar.h          |    4 -
 hv_func.h           |  430 ++++++++-----
 hv_macro.h          |   81 ---
 perl.c              |   56 +-
 perl.h              |   12 +-
 perlapi.h           |    4 -
 perlvars.h          |    6 -
 sbox32_hash.h       | 1777 ---------------------------------------------------
 stadtx_hash.h       |  301 ---------
 t/porting/globvar.t |    2 +-
 util.c              |    4 +-
 zaphod32_hash.h     |  285 ---------
 14 files changed, 342 insertions(+), 2715 deletions(-)
 delete mode 100644 hv_macro.h
 delete mode 100644 sbox32_hash.h
 delete mode 100644 stadtx_hash.h
 delete mode 100644 zaphod32_hash.h

diff --git a/INSTALL b/INSTALL
index 3d8fa2d9a7..d2b5784fe3 100644
--- a/INSTALL
+++ b/INSTALL
@@ -366,79 +366,58 @@ 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.>
 
-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 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.
 
     PERL_HASH_FUNC_SIPHASH
-    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_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_PERTURB_KEYS_DISABLED
 
-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:
+You can disable the environment variable checks and specify the type of
+key traversal randomization to be used by defining one of these:
 
     PERL_PERTURB_KEYS_RANDOM
     PERL_PERTURB_KEYS_DETERMINISTIC
 
-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
+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
 the PERL_HASH_SEED environment variable.
 
-You can change this behavior so that your perl is built with a hard coded
-seed with the define
+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
 
     NO_HASH_SEED
 
-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.
+to the compilation flags to completely disable the randomisation feature.
+Note these modes are poorly tested, insecure and not recommended.
 
-B<NOTE WELL: Perl has never guaranteed any ordering of the hash keys>, and the
+B<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 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.
+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.
 
 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 61fe5fe861..197c7046a7 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4444,7 +4444,6 @@ 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
@@ -5208,10 +5207,8 @@ 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
@@ -6030,4 +6027,3 @@ 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 67914f2645..a33f213efc 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -385,14 +385,10 @@
 #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/hv_func.h b/hv_func.h
index e091c86b0f..f0afe27dbb 100644
--- a/hv_func.h
+++ b/hv_func.h
@@ -4,155 +4,148 @@
  * 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 IVSZIE == 8
+#define CAN64BITHASH
+#endif
 
 #if !( 0 \
         || defined(PERL_HASH_FUNC_SIPHASH) \
         || defined(PERL_HASH_FUNC_SIPHASH13) \
-        || defined(PERL_HASH_FUNC_STADTX) \
-        || defined(PERL_HASH_FUNC_ZAPHOD32) \
+        || defined(PERL_HASH_FUNC_HYBRID_OAATHU_SIPHASH13) \
+        || defined(PERL_HASH_FUNC_ONE_AT_A_TIME_HARD) \
     )
-#   ifdef CAN64BITHASH
-#       define PERL_HASH_FUNC_STADTX
-#   else
-#       define PERL_HASH_FUNC_ZAPHOD32
-#   endif
+#ifdef CAN64BITHASH
+#define PERL_HASH_FUNC_HYBRID_OAATHU_SIPHASH13
+#else
+#define PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
 #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_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))
+#   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))
 #elif defined(PERL_HASH_FUNC_SIPHASH13)
-# 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"
+#   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))
 #endif
 
-#ifndef __PERL_HASH_WITH_STATE
+#ifndef PERL_HASH_WITH_SEED
 #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
 
-#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
-
-#define _PERL_HASH_FUNC         "SBOX32_WITH_" __PERL_HASH_FUNC
-
-#define _PERL_HASH_SEED_BYTES   ( __PERL_HASH_SEED_BYTES + ( 3 * sizeof(U32) ) 
)
-
-#define _PERL_HASH_STATE_BYTES  \
-    ( __PERL_HASH_SEED_BYTES + ( ( 1 + ( 256 * SBOX32_MAX_LEN ) ) * 
sizeof(U32) ) )
+#define PERL_HASH(hash,str,len) 
PERL_HASH_WITH_SEED(PERL_HASH_SEED,hash,str,len)
 
-#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
+/* 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_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)))
+/*-----------------------------------------------------------------------------
+ * 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
+ */
 
+#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
+  || defined(_MSC_VER) || defined (__TURBOC__)
+#define U8TO16_LE(d) (*((const U16 *) (d)))
 #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);
-}
+#if !defined (U8TO16_LE)
+#define U8TO16_LE(d) ((((const U8 *)(d))[1] << 8)\
+                      +((const U8 *)(d))[0])
+#endif
 
-#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)))
+#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
-#define PERL_HASH(hash,str,len) \
-    PERL_HASH_WITH_STATE(PL_hash_state,hash,(U8*)(str),(len))
+  /* 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
 
-/* 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 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
 
-#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
+/* 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 CAN64BITHASH
+    #define ROTL64(x,r)  _rotl64(x,r)
+  #endif
+#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 CAN64BITHASH
+    #define ROTL64(x,r)  (((U64)x << r) | ((U64)x >> (64 - r)))
+  #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)
+
+#ifdef UV_IS_QUAD
+#define ROTL_UV(x,r) ROTL64(x,r)
+#else
+#define ROTL_UV(x,r) ROTL32(x,r)
 #endif
 
 /* This is SipHash by Jean-Philippe Aumasson and Daniel J. Bernstein.
@@ -171,6 +164,16 @@ U32 S_perl_hash_with_seed(const U8 * const seed, const U8 
* const str, const STR
 
 #ifdef CAN64BITHASH
 
+#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))
+
 #define SIPROUND            \
   STMT_START {              \
     v0 += v1; v1=ROTL64(v1,13); v1 ^= v0; v0=ROTL64(v0,32); \
@@ -179,37 +182,30 @@ U32 S_perl_hash_with_seed(const U8 * const seed, const U8 
* const str, const STR
     v2 += v1; v1=ROTL64(v1,17); v1 ^= v2; v2=ROTL64(v2,32); \
   } STMT_END
 
-#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]);
-}
+/* SipHash-2-4 */
+
 
 #define PERL_SIPHASH_FNC(FNC,SIP_ROUNDS,SIP_FINAL_ROUNDS) \
 PERL_STATIC_INLINE U32 \
-FNC ## _with_state \
-  (const unsigned char * const state, const unsigned char *in, const STRLEN 
inlen) \
-{                                           \
+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;                                    \
   const int left = inlen & 7;               \
   const U8 *end = in + inlen - left;        \
                                             \
-  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);             \
+  b = ( ( U64 )(inlen) ) << 56;             \
+  v3 ^= k1;                                 \
+  v2 ^= k0;                                 \
+  v1 ^= k1;                                 \
+  v0 ^= k0;                                 \
                                             \
   for ( ; in != end; in += 8 )              \
   {                                         \
@@ -245,17 +241,8 @@ FNC ## _with_state \
                                             \
   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;
@@ -267,6 +254,151 @@ PERL_SIPHASH_FNC(
     ,SIPROUND;SIPROUND;
     ,SIPROUND;SIPROUND;SIPROUND;SIPROUND;
 )
+
+#endif /* defined(CAN64BITHASH) */
+
+/* - 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 CAN64BITHASH
+
+/* 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(CAN64BITHASH) */
 
 
diff --git a/hv_macro.h b/hv_macro.h
deleted file mode 100644
index 77a4c84896..0000000000
--- a/hv_macro.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#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 d7b0866dd0..658f260997 100644
--- a/perl.c
+++ b/perl.c
@@ -308,54 +308,27 @@ perl_construct(pTHXx)
 #ifdef USE_REENTRANT_API
     Perl_reentrant_init(aTHX);
 #endif
-    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 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.
          *
-         * 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 */
+         * XXX: fix this comment */
+    if (PL_hash_seed_set == FALSE) {
         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, 1 << 11);
+    hv_ksplit(PL_strtab, 512);
 
     Zero(PL_sv_consts, SV_CONSTS_COUNT, SV*);
 
@@ -1564,7 +1537,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_DEBUG)) && 
!defined(NO_PERL_HASH_SEED_DEBUG)
+#if (defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT) || 
defined(USE_HASH_SEED_DEBUG)) && !defined(NO_PERL_HASH_SEED_DEBUG)
     {
         const char * const s = PerlEnv_getenv("PERL_HASH_SEED_DEBUG");
 
@@ -1583,7 +1556,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) ... */
+#endif /* #if (defined(USE_HASH_SEED) || defined(USE_HASH_SEED_EXPLICIT) ... */
 
 #ifdef __amigaos4__
     {
@@ -1869,6 +1842,9 @@ 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 ea6b79f549..70e12bd722 100644
--- a/perl.h
+++ b/perl.h
@@ -3887,12 +3887,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 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)
+ * 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)
 #  define USE_HASH_SEED
 #endif
 
diff --git a/perlapi.h b/perlapi.h
index cedd207386..91f50eb2b0 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -117,14 +117,10 @@ 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 bdc8467902..884d57c504 100644
--- a/perlvars.h
+++ b/perlvars.h
@@ -248,12 +248,6 @@ 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/sbox32_hash.h b/sbox32_hash.h
deleted file mode 100644
index 9c98195899..0000000000
--- a/sbox32_hash.h
+++ /dev/null
@@ -1,1777 +0,0 @@
-#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
-#define case_92_SBOX32(hash,state,key) _SBOX32_CASE(92,hash,state,key)
-#else
-#define case_92_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 91
-#define case_91_SBOX32(hash,state,key) _SBOX32_CASE(91,hash,state,key)
-#else
-#define case_91_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 90
-#define case_90_SBOX32(hash,state,key) _SBOX32_CASE(90,hash,state,key)
-#else
-#define case_90_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 89
-#define case_89_SBOX32(hash,state,key) _SBOX32_CASE(89,hash,state,key)
-#else
-#define case_89_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 88
-#define case_88_SBOX32(hash,state,key) _SBOX32_CASE(88,hash,state,key)
-#else
-#define case_88_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 87
-#define case_87_SBOX32(hash,state,key) _SBOX32_CASE(87,hash,state,key)
-#else
-#define case_87_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 86
-#define case_86_SBOX32(hash,state,key) _SBOX32_CASE(86,hash,state,key)
-#else
-#define case_86_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 85
-#define case_85_SBOX32(hash,state,key) _SBOX32_CASE(85,hash,state,key)
-#else
-#define case_85_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 84
-#define case_84_SBOX32(hash,state,key) _SBOX32_CASE(84,hash,state,key)
-#else
-#define case_84_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 83
-#define case_83_SBOX32(hash,state,key) _SBOX32_CASE(83,hash,state,key)
-#else
-#define case_83_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 82
-#define case_82_SBOX32(hash,state,key) _SBOX32_CASE(82,hash,state,key)
-#else
-#define case_82_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 81
-#define case_81_SBOX32(hash,state,key) _SBOX32_CASE(81,hash,state,key)
-#else
-#define case_81_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 80
-#define case_80_SBOX32(hash,state,key) _SBOX32_CASE(80,hash,state,key)
-#else
-#define case_80_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 79
-#define case_79_SBOX32(hash,state,key) _SBOX32_CASE(79,hash,state,key)
-#else
-#define case_79_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 78
-#define case_78_SBOX32(hash,state,key) _SBOX32_CASE(78,hash,state,key)
-#else
-#define case_78_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 77
-#define case_77_SBOX32(hash,state,key) _SBOX32_CASE(77,hash,state,key)
-#else
-#define case_77_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 76
-#define case_76_SBOX32(hash,state,key) _SBOX32_CASE(76,hash,state,key)
-#else
-#define case_76_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 75
-#define case_75_SBOX32(hash,state,key) _SBOX32_CASE(75,hash,state,key)
-#else
-#define case_75_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 74
-#define case_74_SBOX32(hash,state,key) _SBOX32_CASE(74,hash,state,key)
-#else
-#define case_74_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 73
-#define case_73_SBOX32(hash,state,key) _SBOX32_CASE(73,hash,state,key)
-#else
-#define case_73_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 72
-#define case_72_SBOX32(hash,state,key) _SBOX32_CASE(72,hash,state,key)
-#else
-#define case_72_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 71
-#define case_71_SBOX32(hash,state,key) _SBOX32_CASE(71,hash,state,key)
-#else
-#define case_71_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 70
-#define case_70_SBOX32(hash,state,key) _SBOX32_CASE(70,hash,state,key)
-#else
-#define case_70_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 69
-#define case_69_SBOX32(hash,state,key) _SBOX32_CASE(69,hash,state,key)
-#else
-#define case_69_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 68
-#define case_68_SBOX32(hash,state,key) _SBOX32_CASE(68,hash,state,key)
-#else
-#define case_68_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 67
-#define case_67_SBOX32(hash,state,key) _SBOX32_CASE(67,hash,state,key)
-#else
-#define case_67_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 66
-#define case_66_SBOX32(hash,state,key) _SBOX32_CASE(66,hash,state,key)
-#else
-#define case_66_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 65
-#define case_65_SBOX32(hash,state,key) _SBOX32_CASE(65,hash,state,key)
-#else
-#define case_65_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 64
-#define case_64_SBOX32(hash,state,key) _SBOX32_CASE(64,hash,state,key)
-#else
-#define case_64_SBOX32(hash,state,key) /**/
-#endif
-#if SBOX32_MAX_LEN >= 63
-#define case_63_SBOX32(hash,state,key) _SBOX32_CASE(63,hash,state,key)
-#else
**** PATCH TRUNCATED AT 2000 LINES -- 1337 NOT SHOWN ****

--
Perl5 Master Repository

Reply via email to