summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine/expression/expression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/build_engine/expression/expression.cpp')
-rw-r--r--src/buildtool/build_engine/expression/expression.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buildtool/build_engine/expression/expression.cpp b/src/buildtool/build_engine/expression/expression.cpp
index 9f901708..7d0f55b5 100644
--- a/src/buildtool/build_engine/expression/expression.cpp
+++ b/src/buildtool/build_engine/expression/expression.cpp
@@ -241,7 +241,7 @@ auto Expression::ComputeHash() const noexcept -> std::string {
// The type of HashFunction is irrelevant here. It is used for
// identification and quick comparison of expressions. SHA256 is used.
- HashFunction const hash_function{HashFunction::JustHash::Compatible};
+ HashFunction const hash_function{HashFunction::Type::PlainSHA256};
if (IsNone() or IsBool() or IsNumber() or IsString() or IsArtifact() or
IsResult() or IsNode() or IsName()) {
// just hash the JSON representation, but prepend "@" for artifact,
@@ -251,7 +251,7 @@ auto Expression::ComputeHash() const noexcept -> std::string {
: IsNode() ? "#"
: IsName() ? "$"
: ""};
- hash = hash_function.ComputeHash(prefix + ToString()).Bytes();
+ hash = hash_function.PlainHashData(prefix + ToString()).Bytes();
}
else {
auto hasher = hash_function.MakeHasher();
@@ -266,7 +266,7 @@ auto Expression::ComputeHash() const noexcept -> std::string {
auto map = Value<Expression::map_t>();
hasher.Update("{");
for (auto const& el : map->get()) {
- hasher.Update(hash_function.ComputeHash(el.first).Bytes());
+ hasher.Update(hash_function.PlainHashData(el.first).Bytes());
hasher.Update(el.second->ToHash());
}
}