From 1ea0b1d9ff98d8c44658046019c94f5952ad5c66 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Tue, 14 Jun 2022 18:41:53 +0200 Subject: Crypto: Add and use set of globally used hash functions --- src/buildtool/execution_api/common/execution_common.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_api/common/execution_common.hpp') diff --git a/src/buildtool/execution_api/common/execution_common.hpp b/src/buildtool/execution_api/common/execution_common.hpp index 1208fc99..a3b364d9 100644 --- a/src/buildtool/execution_api/common/execution_common.hpp +++ b/src/buildtool/execution_api/common/execution_common.hpp @@ -17,7 +17,7 @@ #include #include "gsl-lite/gsl-lite.hpp" -#include "src/buildtool/crypto/hash_generator.hpp" +#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/utils/cpp/hex_string.hpp" @@ -89,7 +89,7 @@ static void EncodeUUIDVariant1(std::string* uuid) { constexpr auto kHexDashPos = std::array{8UL, 12UL, 16UL, 20UL}; auto value = fmt::format("{}-{}", std::to_string(kRandomConstant), seed); - auto uuid = HashGenerator::Instance().Run(value).Bytes(); + auto uuid = HashFunction::ComputeHash(value).Bytes(); EncodeUUIDVersion4(&uuid); EncodeUUIDVariant1(&uuid); gsl_Expects(uuid.size() >= kRawLength); -- cgit v1.2.3