The Pedigree Project 0.1
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SpookyHash Class Reference
+ Collaboration diagram for SpookyHash:

Public Member Functions

void Init (uint64 seed1, uint64 seed2)
 
void Update (const void *message, size_t length)
 
void Final (uint64 *hash1, uint64 *hash2)
 

Static Public Member Functions

static void Hash128 (const void *message, size_t length, uint64 *hash1, uint64 *hash2)
 
static uint64 Hash64 (const void *message, size_t length, uint64 seed)
 
static uint32 Hash32 (const void *message, size_t length, uint32 seed)
 
static INLINE uint64 Rot64 (uint64 x, int k)
 
static INLINE void Mix (const uint64 *data, uint64 &s0, uint64 &s1, uint64 &s2, uint64 &s3, uint64 &s4, uint64 &s5, uint64 &s6, uint64 &s7, uint64 &s8, uint64 &s9, uint64 &s10, uint64 &s11)
 
static INLINE void EndPartial (uint64 &h0, uint64 &h1, uint64 &h2, uint64 &h3, uint64 &h4, uint64 &h5, uint64 &h6, uint64 &h7, uint64 &h8, uint64 &h9, uint64 &h10, uint64 &h11)
 
static INLINE void End (const uint64 *data, uint64 &h0, uint64 &h1, uint64 &h2, uint64 &h3, uint64 &h4, uint64 &h5, uint64 &h6, uint64 &h7, uint64 &h8, uint64 &h9, uint64 &h10, uint64 &h11)
 
static INLINE void ShortMix (uint64 &h0, uint64 &h1, uint64 &h2, uint64 &h3)
 
static INLINE void ShortEnd (uint64 &h0, uint64 &h1, uint64 &h2, uint64 &h3)
 

Static Private Member Functions

static void Short (const void *message, size_t length, uint64 *hash1, uint64 *hash2)
 

Private Attributes

uint64 m_data [2 *sc_numVars]
 
uint64 m_state [sc_numVars]
 
size_t m_length
 
uint8 m_remainder
 

Static Private Attributes

static const size_t sc_numVars = 12
 
static const size_t sc_blockSize = sc_numVars * 8
 
static const size_t sc_bufSize = 2 * sc_blockSize
 
static const uint64 sc_const = 0xdeadbeefdeadbeefLL
 

Detailed Description

Definition at line 65 of file SpookyV2.h.

Member Function Documentation

◆ End()

static INLINE void SpookyHash::End ( const uint64 *  data,
uint64 &  h0,
uint64 &  h1,
uint64 &  h2,
uint64 &  h3,
uint64 &  h4,
uint64 &  h5,
uint64 &  h6,
uint64 &  h7,
uint64 &  h8,
uint64 &  h9,
uint64 &  h10,
uint64 &  h11 
)
inlinestatic

Definition at line 264 of file SpookyV2.h.

◆ EndPartial()

static INLINE void SpookyHash::EndPartial ( uint64 &  h0,
uint64 &  h1,
uint64 &  h2,
uint64 &  h3,
uint64 &  h4,
uint64 &  h5,
uint64 &  h6,
uint64 &  h7,
uint64 &  h8,
uint64 &  h9,
uint64 &  h10,
uint64 &  h11 
)
inlinestatic

Definition at line 223 of file SpookyV2.h.

◆ Final()

void SpookyHash::Final ( uint64 *  hash1,
uint64 *  hash2 
)

Definition at line 293 of file spooky.cc.

◆ Hash128()

void SpookyHash::Hash128 ( const void *  message,
size_t  length,
uint64 *  hash1,
uint64 *  hash2 
)
static

Definition at line 146 of file spooky.cc.

◆ Hash32()

static uint32 SpookyHash::Hash32 ( const void *  message,
size_t  length,
uint32  seed 
)
inlinestatic

Definition at line 90 of file SpookyV2.h.

◆ Hash64()

static uint64 SpookyHash::Hash64 ( const void *  message,
size_t  length,
uint64  seed 
)
inlinestatic

Definition at line 78 of file SpookyV2.h.

◆ Init()

void SpookyHash::Init ( uint64  seed1,
uint64  seed2 
)

Definition at line 196 of file spooky.cc.

◆ Mix()

static INLINE void SpookyHash::Mix ( const uint64 *  data,
uint64 &  s0,
uint64 &  s1,
uint64 &  s2,
uint64 &  s3,
uint64 &  s4,
uint64 &  s5,
uint64 &  s6,
uint64 &  s7,
uint64 &  s8,
uint64 &  s9,
uint64 &  s10,
uint64 &  s11 
)
inlinestatic

Definition at line 142 of file SpookyV2.h.

◆ Rot64()

static INLINE uint64 SpookyHash::Rot64 ( uint64  x,
int  k 
)
inlinestatic

Definition at line 125 of file SpookyV2.h.

◆ Short()

void SpookyHash::Short ( const void *  message,
size_t  length,
uint64 *  hash1,
uint64 *  hash2 
)
staticprivate

Definition at line 43 of file spooky.cc.

◆ ShortEnd()

static INLINE void SpookyHash::ShortEnd ( uint64 &  h0,
uint64 &  h1,
uint64 &  h2,
uint64 &  h3 
)
inlinestatic

Definition at line 350 of file SpookyV2.h.

◆ ShortMix()

static INLINE void SpookyHash::ShortMix ( uint64 &  h0,
uint64 &  h1,
uint64 &  h2,
uint64 &  h3 
)
inlinestatic

Definition at line 299 of file SpookyV2.h.

◆ Update()

void SpookyHash::Update ( const void *  message,
size_t  length 
)

Definition at line 204 of file spooky.cc.

Member Data Documentation

◆ m_data

uint64 SpookyHash::m_data[2 *sc_numVars]
private

Definition at line 416 of file SpookyV2.h.

◆ m_length

size_t SpookyHash::m_length
private

Definition at line 418 of file SpookyV2.h.

◆ m_remainder

uint8 SpookyHash::m_remainder
private

Definition at line 419 of file SpookyV2.h.

◆ m_state

uint64 SpookyHash::m_state[sc_numVars]
private

Definition at line 417 of file SpookyV2.h.

◆ sc_blockSize

const size_t SpookyHash::sc_blockSize = sc_numVars * 8
staticprivate

Definition at line 402 of file SpookyV2.h.

◆ sc_bufSize

const size_t SpookyHash::sc_bufSize = 2 * sc_blockSize
staticprivate

Definition at line 405 of file SpookyV2.h.

◆ sc_const

const uint64 SpookyHash::sc_const = 0xdeadbeefdeadbeefLL
staticprivate

Definition at line 414 of file SpookyV2.h.

◆ sc_numVars

const size_t SpookyHash::sc_numVars = 12
staticprivate

Definition at line 399 of file SpookyV2.h.


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