NDEVR
API Documentation
HashMaker

Computes hash values from arbitrary data using an FNV-like combining algorithm. More...

Public Member Functions

template<class t_type>
void hash (const Buffer< t_type > &value)
 Hashes each element of a Buffer sequentially.
void hash (const char *value)
 Hashes a null-terminated C string by hashing its character data.
void hash (const String &s)
 Hashes a String by hashing its character data.
void hash (const StringView &value)
 Hashes a StringView by hashing its character data.
template<class t_type>
void hash (const t_type &value)
 Hashes an arbitrary value by hashing its raw memory representation.
uint08 hashValue () const
 Returns the current accumulated hash value.

Detailed Description

Computes hash values from arbitrary data using an FNV-like combining algorithm.


Definition at line 9 of file HashMaker.h.

Member Function Documentation

◆ hash() [1/5]

template<class t_type>
void HashMaker::hash ( const Buffer< t_type > & value)
inline

Hashes each element of a Buffer sequentially.

Parameters
[in]valueThe buffer whose elements are hashed.

Definition at line 50 of file HashMaker.h.

References hash().

◆ hash() [2/5]

void HashMaker::hash ( const char * value)
inline

Hashes a null-terminated C string by hashing its character data.

Parameters
[in]valueThe null-terminated string to hash.

Definition at line 41 of file HashMaker.h.

References String::str_len().

◆ hash() [3/5]

void HashMaker::hash ( const String & s)
inline

Hashes a String by hashing its character data.

Parameters
[in]sThe string to hash.

Definition at line 25 of file HashMaker.h.

◆ hash() [4/5]

void HashMaker::hash ( const StringView & value)
inline

Hashes a StringView by hashing its character data.

Parameters
[in]valueThe string view to hash.

Definition at line 33 of file HashMaker.h.

References StringView::begin(), and StringView::size().

◆ hash() [5/5]

template<class t_type>
void HashMaker::hash ( const t_type & value)
inline

Hashes an arbitrary value by hashing its raw memory representation.

Parameters
[in]valueThe value to hash.

Definition at line 17 of file HashMaker.h.

Referenced by hash().

◆ hashValue()

uint08 HashMaker::hashValue ( ) const
inline

Returns the current accumulated hash value.

Returns
The computed hash as a uint08.

Definition at line 59 of file HashMaker.h.


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