summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-09-23 10:10:32 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-10-25 13:00:43 +0200
commitbfefe45f8731e10a92f739d630a3c027fc72bc5b (patch)
tree252bb302bf58fbcd5a6559cc233cc5d06c49d4bf /src
parent6b9a7e11563d20aa4e4cb4c62146362f4c90c533 (diff)
downloadjustbuild-bfefe45f8731e10a92f739d630a3c027fc72bc5b.tar.gz
ArtifactDigest: Add getter for hash function type
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/common/artifact_digest.hpp5
1 files changed, 5 insertions, 0 deletions
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 <string>
#include <utility> // 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;