20#ifndef BEAST_HASH_XXHASHER_H_INCLUDED
21#define BEAST_HASH_XXHASHER_H_INCLUDED
23#include <boost/endian/conversion.hpp>
41 static_assert(
sizeof(
std::size_t) == 8,
"requires 64-bit std::size_t");
79 auto ret = XXH3_createState();
104 XXH3_64bits_update(
state_, data, len);
114 return XXH3_64bits_digest(
state_);
120 return XXH3_64bits_withSeed(
131 static constexpr auto const endian = boost::endian::order::native;
void flushToState(void const *data, std::size_t len)
void updateHash(void const *data, std::size_t len)
xxhasher(Seed seed, Seed)
static constexpr auto const endian
xxhasher & operator=(xxhasher const &)=delete
std::span< std::uint8_t > writeBuffer_
static constexpr std::size_t INTERNAL_BUFFER_SIZE
static XXH3_state_t * allocState()
std::span< std::uint8_t > readBuffer_
result_type retrieveHash()
void operator()(void const *key, std::size_t len) noexcept
xxhasher(xxhasher const &)=delete
std::array< std::uint8_t, INTERNAL_BUFFER_SIZE > buffer_
std::optional< XXH64_hash_t > seed_