Files
chaos/Chaos/Hash/Hasher.hpp
T
hashlag b03fddd40b
Chaos Ci / test (push) Successful in 3m17s
Chaos Ci / benchmark (push) Successful in 1m54s
Replace Hasher CRTP base with a concept.
2026-08-31 01:22:07 +03:00

22 lines
366 B
C++

#ifndef CHAOS_HASH_HASHER_HPP
#define CHAOS_HASH_HASHER_HPP
#include <cstdint>
#include "Hash.hpp"
namespace Chaos::Hash
{
template<typename T>
concept Hasher = requires(T hasher, uint8_t * begin, uint8_t * end)
{
hasher.Reset();
hasher.Update(begin, end);
{ hasher.Finish() } -> Hash;
};
} // namespace Chaos::Hash
#endif // CHAOS_HASH_HASHER_HPP