From a5be6de770c9152f3248ce0f01ac3645e30a19ed Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 17 Jul 2024 16:26:25 +0200 Subject: Use compile-time polymorphism in Hasher ...since runtime polymorphism was there just to avoid including openssl as a public dependency. A combination of forward declarations, std::variant and std::unique_ptr is used instead. --- src/buildtool/crypto/hash_impl_sha512.hpp | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/buildtool/crypto/hash_impl_sha512.hpp (limited to 'src/buildtool/crypto/hash_impl_sha512.hpp') diff --git a/src/buildtool/crypto/hash_impl_sha512.hpp b/src/buildtool/crypto/hash_impl_sha512.hpp deleted file mode 100644 index 8a32cc42..00000000 --- a/src/buildtool/crypto/hash_impl_sha512.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef INCLUDED_SRC_BUILDTOOL_CRYPTO_HASH_IMPL_SHA512_HPP -#define INCLUDED_SRC_BUILDTOOL_CRYPTO_HASH_IMPL_SHA512_HPP - -#include - -#include "src/buildtool/crypto/hasher.hpp" - -[[nodiscard]] extern auto CreateHashImplSha512() - -> std::unique_ptr; - -#endif // INCLUDED_SRC_BUILDTOOL_CRYPTO_HASH_IMPL_SHA512_HPP -- cgit v1.2.3