BPHash
General object hashing library for C++
Public Member Functions | List of all members
bphash::detail::MurmurHash3_32_x32 Class Reference

Implementation of MurmurHash3 32-bit x32 hash. More...

#include <MurmurHash3_32_x32.hpp>

Inheritance diagram for bphash::detail::MurmurHash3_32_x32:
Inheritance graph
[legend]
Collaboration diagram for bphash::detail::MurmurHash3_32_x32:
Collaboration graph
[legend]

Public Member Functions

 MurmurHash3_32_x32 (void)
 
 ~MurmurHash3_32_x32 (void)=default
 
 MurmurHash3_32_x32 (const MurmurHash3_32_x32 &)=default
 
MurmurHash3_32_x32operator= (const MurmurHash3_32_x32 &)=default
 
 MurmurHash3_32_x32 (MurmurHash3_32_x32 &&)=default
 
MurmurHash3_32_x32operator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

bphash::detail::MurmurHash3_32_x32::MurmurHash3_32_x32 ( void  )

Definition at line 43 of file MurmurHash3_32_x32.cpp.

Here is the call graph for this function:

bphash::detail::MurmurHash3_32_x32::~MurmurHash3_32_x32 ( void  )
default
bphash::detail::MurmurHash3_32_x32::MurmurHash3_32_x32 ( const MurmurHash3_32_x32 )
default
bphash::detail::MurmurHash3_32_x32::MurmurHash3_32_x32 ( MurmurHash3_32_x32 &&  )
default

Member Function Documentation

HashValue bphash::detail::MurmurHash3_32_x32::finalize ( void  )
virtual

Finish hashing and report the hash.

Finish hashing any remaining data if necessary, and perform and last steps. Then, return the hash.

Returns
The computed hash of all the data that had been added

Implements bphash::detail::HashImpl.

Definition at line 120 of file MurmurHash3_32_x32.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

MurmurHash3_32_x32& bphash::detail::MurmurHash3_32_x32::operator= ( const MurmurHash3_32_x32 )
default
MurmurHash3_32_x32& bphash::detail::MurmurHash3_32_x32::operator= ( MurmurHash3_32_x32 &&  )
default
void bphash::detail::MurmurHash3_32_x32::reset ( void  )
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.

Here is the caller graph for this function:

void bphash::detail::MurmurHash3_32_x32::update ( void const *  data,
size_t  nbytes 
)
virtual

Add some data to the hash.

Parameters
[in]dataThe raw data to hash
[in]nbytesNumber of bytes pointed to by data

Implements bphash::detail::HashImpl.

Definition at line 58 of file MurmurHash3_32_x32.cpp.

Here is the caller graph for this function:


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