diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 16:41:52 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 17:02:34 +0200 |
commit | 21014f3be3e4f8ebf34243f4f10841f0fb0b3843 (patch) | |
tree | 1208031cead9f9ca78d0f13a273f8242c045f3fc /src/buildtool/build_engine/expression/expression.cpp | |
parent | b2f51059cc034f03c70df28a5597a591ed3e5c5d (diff) | |
download | justbuild-21014f3be3e4f8ebf34243f4f10841f0fb0b3843.tar.gz |
Rename HashFunction methods and enums
Diffstat (limited to 'src/buildtool/build_engine/expression/expression.cpp')
-rw-r--r-- | src/buildtool/build_engine/expression/expression.cpp | 6 |
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()); } } |