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/crypto/hash_function.cpp | |
parent | b2f51059cc034f03c70df28a5597a591ed3e5c5d (diff) | |
download | justbuild-21014f3be3e4f8ebf34243f4f10841f0fb0b3843.tar.gz |
Rename HashFunction methods and enums
Diffstat (limited to 'src/buildtool/crypto/hash_function.cpp')
-rw-r--r-- | src/buildtool/crypto/hash_function.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/buildtool/crypto/hash_function.cpp b/src/buildtool/crypto/hash_function.cpp index a759a0ce..6f240e50 100644 --- a/src/buildtool/crypto/hash_function.cpp +++ b/src/buildtool/crypto/hash_function.cpp @@ -31,17 +31,17 @@ namespace { } } // namespace -auto HashFunction::ComputeBlobHash(std::string const& data) const noexcept +auto HashFunction::HashBlobData(std::string const& data) const noexcept -> Hasher::HashDigest { return HashTaggedLine(data, CreateGitBlobTag); } -auto HashFunction::ComputeTreeHash(std::string const& data) const noexcept +auto HashFunction::HashTreeData(std::string const& data) const noexcept -> Hasher::HashDigest { return HashTaggedLine(data, CreateGitTreeTag); } -auto HashFunction::ComputeHash(std::string const& data) const noexcept +auto HashFunction::PlainHashData(std::string const& data) const noexcept -> Hasher::HashDigest { return HashTaggedLine(data, std::nullopt); } @@ -50,7 +50,7 @@ auto HashFunction::HashTaggedLine(std::string const& data, std::optional<TagCreator> tag_creator) const noexcept -> Hasher::HashDigest { auto hasher = MakeHasher(); - if (type_ == JustHash::Native and tag_creator.has_value()) { + if (type_ == Type::GitSHA1 and tag_creator.has_value()) { hasher.Update(std::invoke(*tag_creator, data.size())); } hasher.Update(data); @@ -79,7 +79,7 @@ auto HashFunction::HashTaggedFile(std::filesystem::path const& path, "An overflow will occur while reading"); auto hasher = MakeHasher(); - if (type_ == JustHash::Native) { + if (type_ == Type::GitSHA1) { hasher.Update(std::invoke(tag_creator, size)); } |