Update concept Hasher: require T::BLOCK_SIZE_BYTES.
This commit is contained in:
1 parent
cb8b6ceeb8
commit
97aeb229ad
1 file changed
+3
@@ -1,7 +1,9 @@
|
||||
#ifndef CHAOS_HASH_HASHER_HPP
|
||||
#define CHAOS_HASH_HASHER_HPP
|
||||
|
||||
#include <concepts>
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
|
||||
#include "Hash.hpp"
|
||||
|
||||
@@ -12,6 +14,7 @@ template<typename T>
|
||||
concept Hasher = requires(T hasher, uint8_t * begin, uint8_t * end)
|
||||
{
|
||||
typename T::HashType;
|
||||
requires std::unsigned_integral<std::remove_cvref_t<decltype(T::BLOCK_SIZE_BYTES)>>;
|
||||
hasher.Reset();
|
||||
hasher.Update(begin, end);
|
||||
{ hasher.Finish() } -> Hash;
|
||||
|
||||
Reference in new issue
Block a user