Sux
Static Public Member Functions | List of all members
SpookyHash Class Reference

#include <SpookyV2.hpp>

Static Public Member Functions

static void Short128 (const void *data, size_t length, uint64_t *hash1, uint64_t *hash2)
 
static uint64_t Short64 (const void *data, size_t length, uint64_t seed)
 
static void Hash128 (const void *data, size_t length, uint64_t *hash1, uint64_t *hash2)
 
static uint64_t Hash64 (const void *data, size_t length, uint64_t seed)
 

Member Function Documentation

◆ Hash128()

static void SpookyHash::Hash128 ( const void *  data,
size_t  length,
uint64_t *  hash1,
uint64_t *  hash2 
)
inlinestatic

Hashes long data to 128 bits.

This version has a higher startup cost, and it is more efficient on long (more than about 200 characters) strings.

Parameters
databytes to hash.
lengthnumber of valid bytes in data.
hash1in seed 1, out hash 1.
hash2in seed 2, out hash 2.

◆ Hash64()

static uint64_t SpookyHash::Hash64 ( const void *  data,
size_t  length,
uint64_t  seed 
)
inlinestatic

Hashes long data to 64 bits.

This version has a higher startup cost, and it is more efficient on long (more than about 200 characters) strings.

Parameters
databytes to hash.
lengthnumber of valid bytes in data.
seeda seed.
Returns
a 64-bit hash.

◆ Short128()

static void SpookyHash::Short128 ( const void *  data,
size_t  length,
uint64_t *  hash1,
uint64_t *  hash2 
)
inlinestatic

Hashes short data to 128 bits.

This version has a lower startup cost, and it is more efficient on short (less than about 200 characters) strings.

Parameters
databytes to hash.
lengthnumber of valid bytes in data.
hash1in seed 1, out hash 1.
hash2in seed 2, out hash 2.

◆ Short64()

static uint64_t SpookyHash::Short64 ( const void *  data,
size_t  length,
uint64_t  seed 
)
inlinestatic

Hashes short data to 75 bits.

This version has a lower startup cost, and it is more efficient on short (less than about 200 characters) strings.

Parameters
databytes to hash.
lengthnumber of valid bytes in data.
seeda seed.
Returns
a 64-bit hash.

The documentation for this class was generated from the following file: