3#include <boost/endian/conversion.hpp>
24 static_assert(
sizeof(
std::size_t) == 8,
"requires 64-bit std::size_t");
61 auto ret = XXH3_createState();
73 if (
seed_.has_value())
84 if ((data !=
nullptr) && (len != 0u))
86 XXH3_64bits_update(
state_, data, len);
96 return XXH3_64bits_digest(
state_);
99 if (
seed_.has_value())
108 static constexpr auto kEndian = boost::endian::order::native;
127 template <
class Seed, std::enable_if_t<std::is_
unsigned_v<Seed>>* =
nullptr>
133 template <
class Seed, std::enable_if_t<std::is_
unsigned_v<Seed>>* =
nullptr>
Xxhasher(Seed seed, Seed)
static constexpr auto kEndian
std::span< std::uint8_t > writeBuffer_
std::array< std::uint8_t, kInternalBufferSize > buffer_
std::span< std::uint8_t > readBuffer_
std::optional< XXH64_hash_t > seed_
result_type retrieveHash()
Xxhasher & operator=(Xxhasher const &)=delete
void updateHash(void const *data, std::size_t len)
Xxhasher(Xxhasher const &)=delete
void flushToState(void const *data, std::size_t len)
static XXH3_state_t * allocState()
static constexpr std::size_t kInternalBufferSize
void operator()(void const *key, std::size_t len) noexcept