librnr/hash.c
static hash_val_t hash_fun_default(const void *key)
{
  static unsigned long randbox[] =
  {
    0x49848f1bU, 0xe6255dbaU, 0x36da5bdcU, 0x47bf94e9U,
    0x8cbcce22U, 0x559fc06aU, 0xd268f536U, 0xe10af79aU,
    0xc1af4d69U, 0x1d2917b5U, 0xec4c304dU, 0x9ee5016cU,
    0x69232f74U, 0xfead7bb3U, 0xe9089ab6U, 0xf012f6aeU,
  };

  const unsigned char *str  = (const unsigned char *)key;
  hash_val_t           acc  = 0;

  while( *str )
  {
    acc ^= randbox[(*str + acc) & 0xf];
    acc = (acc << 1) | (acc >> 31);
    acc &= 0xffffffffU;
    acc ^= randbox[((*str++ >> 4) + acc) & 0xf];
    acc = (acc << 2) | (acc >> 30);
    acc &= 0xffffffffU;
  }
  return acc;
}
/*!
 * \brief Default hashing function over null-terminated string keys.
 *
 * \param key Null-terminated key string.
 *
 * \return Hashed value.
 */
\brief Default hashing function over null-terminated string keys.
\param key Null-terminated key string.

\return Hashed value.
\ brief Default hashing function over null - terminated string keys . \ param key Null - terminated key string . \ return Hashed value .
static hash_val_t hash_fun_default(const void *key)
{
  static unsigned long randbox[] =
  {
    0x49848f1bU, 0xe6255dbaU, 0x36da5bdcU, 0x47bf94e9U,
    0x8cbcce22U, 0x559fc06aU, 0xd268f536U, 0xe10af79aU,
    0xc1af4d69U, 0x1d2917b5U, 0xec4c304dU, 0x9ee5016cU,
    0x69232f74U, 0xfead7bb3U, 0xe9089ab6U, 0xf012f6aeU,
  };
  const unsigned char *str  = (const unsigned char *)key;
  hash_val_t           acc  = 0;
  while( *str )
  {
    acc ^= randbox[(*str + acc) & 0xf];
    acc = (acc << 1) | (acc >> 31);
    acc &= 0xffffffffU;
    acc ^= randbox[((*str++ >> 4) + acc) & 0xf];
    acc = (acc << 2) | (acc >> 30);
    acc &= 0xffffffffU;
  }
  return acc;
}
static hash_val_t hash_fun_default ( const void * key ) { static unsigned long randbox [ ] = { 0x49848f1bU , 0xe6255dbaU , 0x36da5bdcU , 0x47bf94e9U , 0x8cbcce22U , 0x559fc06aU , 0xd268f536U , 0xe10af79aU , 0xc1af4d69U , 0x1d2917b5U , 0xec4c304dU , 0x9ee5016cU , 0x69232f74U , 0xfead7bb3U , 0xe9089ab6U , 0xf012f6aeU , } ; const unsigned char * str = ( const unsigned char * ) key ; hash_val_t acc = 0 ; while ( * str ) { acc ^= randbox [ ( * str + acc ) & 0xf ] ; acc = ( acc << 1 ) | ( acc >> 31 ) ; acc &= 0xffffffffU ; acc ^= randbox [ ( ( * str ++ >> 4 ) + acc ) & 0xf ] ; acc = ( acc << 2 ) | ( acc >> 30 ) ; acc &= 0xffffffffU ; } return acc ; }
\brief Default hashing function over null-terminated string keys.
\ brief Default hashing function over null - terminated string keys .