From bfefe45f8731e10a92f739d630a3c027fc72bc5b Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 23 Sep 2024 10:10:32 +0200 Subject: ArtifactDigest: Add getter for hash function type --- src/buildtool/common/artifact_digest.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/buildtool/common/artifact_digest.hpp b/src/buildtool/common/artifact_digest.hpp index 3bd59e07..5e88232a 100644 --- a/src/buildtool/common/artifact_digest.hpp +++ b/src/buildtool/common/artifact_digest.hpp @@ -19,6 +19,7 @@ #include #include // std::move +#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/crypto/hash_info.hpp" #include "src/utils/cpp/hash_combine.hpp" @@ -50,6 +51,10 @@ class ArtifactDigest final { return hash_info_ == other.hash_info_; } + [[nodiscard]] auto GetHashType() const& noexcept -> HashFunction::Type { + return hash_info_.HashType(); + } + private: HashInfo hash_info_; std::size_t size_ = 0; -- cgit v1.2.3