All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hash.h File Reference

Hash functions. More...

+ Include dependency graph for hash.h:

Go to the source code of this file.

Functions

ARCH_API uint32_t ArchHash (const char *data, size_t len)
 Hash len bytes of data. More...
 
ARCH_API uint32_t ArchHash (const char *data, size_t len, uint32_t seed)
 
ARCH_API uint64_t ArchHash64 (const char *data, size_t len)
 Hash len bytes of data. More...
 
ARCH_API uint64_t ArchHash64 (const char *data, size_t len, uint64_t seed)
 

Detailed Description

Hash functions.

Definition in file hash.h.

Function Documentation

ARCH_API uint32_t ArchHash ( const char *  data,
size_t  len 
)

Hash len bytes of data.

To compute a hash value for data that is not contiguous in memory, iterate over all the contiguous blocks of memory and accumulate the hash value by passing it on as seed. Note that this is not equivalent to hashing the contiguous pieces as a whole. Support for that may be added in future.

ARCH_API uint32_t ArchHash ( const char *  data,
size_t  len,
uint32_t  seed 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

ARCH_API uint64_t ArchHash64 ( const char *  data,
size_t  len 
)

Hash len bytes of data.

To compute a hash value for data that is not contiguous in memory, iterate over all the contiguous blocks of memory and accumulate the hash value by passing it on as seed. Note that this is not equivalent to hashing the contiguous pieces as a whole. Support for that may be added in future.

ARCH_API uint64_t ArchHash64 ( const char *  data,
size_t  len,
uint64_t  seed 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.