Files
chaos/Chaos/Hash/Hash.hpp
hashlag 5d09391339
All checks were successful
ChaosTest CI / build-and-test (push) Successful in 31s
Add comments on closing #include guard #endif's
2026-01-02 21:40:07 +03:00

38 lines
534 B
C++

#ifndef CHAOS_HASH_HASH_HPP
#define CHAOS_HASH_HASH_HPP
#include <string>
namespace Chaos::Hash
{
template<typename T>
class Hash
{
public:
auto GetRawDigest() const
{
return Impl().GetRawDigest();
}
std::string ToHexString() const
{
return Impl().ToHexString();
}
private:
const T & Impl() const
{
return static_cast<const T &>(*this);
}
T & Impl()
{
return static_cast<T &>(*this);
}
};
} // namespace Chaos::Hash
#endif // CHAOS_HASH_HASH_HPP