Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

compute.c File Reference

#include "hash/compute.h"

Defines

#define READ16AT(adr)   *((uint16_t*)(adr))
 This is to read specific # of bits at given addresses.
#define READ8AT(adr)   *((uint8_t*)(adr))

Functions

uint32_t hash_computeU32 (const uint32_t *data, size_t length, uint32_t initval)
 Compute hash value for different data types.
uint32_t hash_computeU16 (const uint16_t *data16, size_t length, uint32_t initval)
 Hash for uint16_t[].
uint32_t hash_computeU8 (const uint8_t *data8, size_t length, uint32_t initval)
 Hash for uint8_t[].

Define Documentation

#define READ16AT adr   )     *((uint16_t*)(adr))
 

This is to read specific # of bits at given addresses.

The cast is done to get rid of the endianness problem.

#define READ8AT adr   )     *((uint8_t*)(adr))
 


Function Documentation

uint32_t hash_computeU16 const uint16_t *  data16,
size_t  length,
uint32_t  initval
 

Hash for uint16_t[].

Parameters:
length,: number of uint16_t
initval,: initial value to start the hash computation.
Returns:
the hash.

uint32_t hash_computeU32 const uint32_t *  data,
size_t  length,
uint32_t  initval
 

Compute hash value for different data types.

Parameters:
length,: number of uint32_t
initval,: initial value to start the hash computation.
Returns:
the hash.

uint32_t hash_computeU8 const uint8_t *  data8,
size_t  length,
uint32_t  initval
 

Hash for uint8_t[].

Parameters:
length,: number of uint16_t
initval,: initial value to start the hash computation.
Returns:
the hash.


Generated on Fri Jun 30 00:03:00 2006 for Module hash by  doxygen 1.4.2