1#ifndef BEAST_HASH_XXHASHER_H_INCLUDED
2#define BEAST_HASH_XXHASHER_H_INCLUDED
4#include <boost/endian/conversion.hpp>
22 static_assert(
sizeof(
std::size_t) == 8,
"requires 64-bit std::size_t");
60 auto ret = XXH3_createState();
85 XXH3_64bits_update(
state_, data, len);
95 return XXH3_64bits_digest(
state_);
101 return XXH3_64bits_withSeed(
112 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_