BPHash
General object hashing library for C++
|
Implementation of MurmurHash3 32-bit x32 hash. More...
#include <MurmurHash3_32_x32.hpp>
Public Member Functions | |
MurmurHash3_32_x32 (void) | |
~MurmurHash3_32_x32 (void)=default | |
MurmurHash3_32_x32 (const MurmurHash3_32_x32 &)=default | |
MurmurHash3_32_x32 & | operator= (const MurmurHash3_32_x32 &)=default |
MurmurHash3_32_x32 (MurmurHash3_32_x32 &&)=default | |
MurmurHash3_32_x32 & | operator= (MurmurHash3_32_x32 &&)=default |
virtual void | update (void const *data, size_t nbytes) |
Add some data to the hash. More... | |
virtual HashValue | finalize (void) |
Finish hashing and report the hash. More... | |
virtual void | reset (void) |
Zero out the hash. More... | |
Public Member Functions inherited from bphash::detail::HashImpl | |
virtual | ~HashImpl ()=default |
Implementation of MurmurHash3 32-bit x32 hash.
This algorithm is the 32-bit MurmurHash3 hash, by Austin Appleby. It is optimized for 32-bit architectures.
The code here is adapted from the smhasher project at https://github.com/aappleby/smhasher. It has been placed in the public domain by the author.
No care has been taken to work with different endianness, etc, since that is beyond the scope of the project.
Definition at line 32 of file MurmurHash3_32_x32.hpp.
bphash::detail::MurmurHash3_32_x32::MurmurHash3_32_x32 | ( | void | ) |
|
default |
|
default |
|
default |
|
virtual |
Finish hashing and report the hash.
Finish hashing any remaining data if necessary, and perform and last steps. Then, return the hash.
Implements bphash::detail::HashImpl.
Definition at line 120 of file MurmurHash3_32_x32.cpp.
|
default |
|
default |
|
virtual |
Zero out the hash.
After this, you can start hashing something else again. May be called before or after finalize.
Implements bphash::detail::HashImpl.
Definition at line 49 of file MurmurHash3_32_x32.cpp.
|
virtual |
Add some data to the hash.
[in] | data | The raw data to hash |
[in] | nbytes | Number of bytes pointed to by data |
Implements bphash::detail::HashImpl.
Definition at line 58 of file MurmurHash3_32_x32.cpp.