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

Base class for a hash implementation. More...

#include <HashImpl.hpp>

Inheritance diagram for bphash::detail::HashImpl:
Inheritance graph
[legend]

Public Member Functions

virtual void update (void const *data, size_t nbytes)=0
 Add some data to the hash. More...
 
virtual HashValue finalize (void)=0
 Finish hashing and report the hash. More...
 
virtual void reset (void)=0
 Zero out the hash. More...
 
virtual ~HashImpl ()=default
 

Detailed Description

Base class for a hash implementation.

Implementations that actually hash data must derive from this class.

Definition at line 22 of file HashImpl.hpp.

Constructor & Destructor Documentation

virtual bphash::detail::HashImpl::~HashImpl ( )
virtualdefault

Member Function Documentation

virtual HashValue bphash::detail::HashImpl::finalize ( void  )
pure 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

Implemented in bphash::detail::MurmurHash3_128_x64, bphash::detail::MurmurHash3_32_x32, bphash::detail::MurmurHash3_64_x64, and bphash::detail::MurmurHash3_32_x64.

Here is the caller graph for this function:

virtual void bphash::detail::HashImpl::reset ( void  )
pure virtual

Zero out the hash.

After this, you can start hashing something else again. May be called before or after finalize.

Implemented in bphash::detail::MurmurHash3_128_x64, and bphash::detail::MurmurHash3_32_x32.

Here is the caller graph for this function:

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

Add some data to the hash.

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

Implemented in bphash::detail::MurmurHash3_128_x64, and bphash::detail::MurmurHash3_32_x32.

Here is the caller graph for this function:


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