template <size_t Bits = (sizeof(size_t)* CHAR_BIT)>
muu::fnv1a class

FNV-1a hasher.

Template parameters
Bits The hash size, in bits.

Constructors, destructors, conversion operators

fnv1a() defaulted constexpr noexcept
Constructs a new FNV-1a hasher.

Public functions

auto operator()(uint8_t byte) -> fnv1a& constexpr noexcept
Appends a single byte to the hash function's input.
auto operator()(std::byte byte) -> fnv1a& constexpr noexcept
Appends a single byte to the hash function's input.
auto operator()(const void* data, size_t size) -> fnv1a& noexcept
Appends a sequence of raw data to the hash function's input.
auto operator()(std::string_view str) -> fnv1a& constexpr noexcept
Appends a string to the hash function's input.
auto operator()(std::wstring_view str) -> fnv1a& constexpr noexcept
Appends a wide string to the hash function's input.
auto operator()(std::u32string_view str) -> fnv1a& constexpr noexcept
Appends a UTF-32 string to the hash function's input.
auto operator()(std::u16string_view str) -> fnv1a& constexpr noexcept
Appends a UTF-16 string to the hash function's input.
auto operator()(std::u8string_view str) -> fnv1a& constexpr noexcept
Appends a UTF-8 string to the hash function's input.
auto value() const -> hash_type constexpr noexcept
Returns the calculated hash value.

Friends

template <typename Char, typename Traits>
auto operator<<(std::basic_ostream<Char, Traits>& lhs, const fnv1a& rhs) -> std::basic_ostream<Char, Traits>&
Writes an FNV-1a hash to a text stream.