hashBuffer#

Fully qualified name: carb::hashBuffer

Defined in carb/Defines.h

template<class T>
uint64_t carb::hashBuffer(
const T *buffer,
const size_t length,
uint64_t hash = kFnvBasis,
)#

Runtime FNV-1a 64-bit byte hash.

Conditionally constexpr if buffer is const unsigned char*

Template Parameters:

T – The pointer type.

Parameters:
  • buffer – The byte buffer to hash.

  • length – The number of bytes in buffer.

  • hash – The previous hash value or starting hash basis.

Returns:

A hash computed from the given parameters.