2#include <NDEVR/BaseValues.h>
3#include <NDEVR/String.h>
16 template<
class t_type>
17 void hash(
const t_type& value)
19 hashMemory(&value,
sizeof(value));
27 hashMemory(s.begin(), s.size());
41 void hash(
const char* value)
49 template<
class t_type>
52 for(
uint04 i = 0; i < value.size(); i++)
66 void hashMemory(
const void* data, std::size_t size)
71 for (std::size_t i = 0; i < size; ++i) {
72 m_hash_value ^=
static_cast<uint08>(bytes[i]);
73 m_hash_value *= 0x100000001B3;
The equivelent of std::vector but with a bit more control.
Computes hash values from arbitrary data using an FNV-like combining algorithm.
void hash(const StringView &value)
Hashes a StringView by hashing its character data.
void hash(const String &s)
Hashes a String by hashing its character data.
void hash(const char *value)
Hashes a null-terminated C string by hashing its character data.
uint08 hashValue() const
Returns the current accumulated hash value.
void hash(const Buffer< t_type > &value)
Hashes each element of a Buffer sequentially.
void hash(const t_type &value)
Hashes an arbitrary value by hashing its raw memory representation.
The core String View class for the NDEVR API.
constexpr const char * begin() const
Returns a pointer to the beginning of the string data.
constexpr uint04 size() const
Returns the byte size of this string view.
The core String class for the NDEVR API.
static constexpr uint04 str_len(const char *value)
constexpr method to get the length of a null-terminated string at compile time
The primary namespace for the NDEVR SDK.
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...