diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-17 16:26:25 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 17:02:34 +0200 |
commit | a5be6de770c9152f3248ce0f01ac3645e30a19ed (patch) | |
tree | f47ff9a1f4947b7b106acb4120a8f77ace5e2671 /src/buildtool/crypto/hash_impl_sha256.hpp | |
parent | 21014f3be3e4f8ebf34243f4f10841f0fb0b3843 (diff) | |
download | justbuild-a5be6de770c9152f3248ce0f01ac3645e30a19ed.tar.gz |
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.
Diffstat (limited to 'src/buildtool/crypto/hash_impl_sha256.hpp')
-rw-r--r-- | src/buildtool/crypto/hash_impl_sha256.hpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/buildtool/crypto/hash_impl_sha256.hpp b/src/buildtool/crypto/hash_impl_sha256.hpp deleted file mode 100644 index e9142ac6..00000000 --- a/src/buildtool/crypto/hash_impl_sha256.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_SHA256_HPP -#define INCLUDED_SRC_BUILDTOOL_CRYPTO_HASH_IMPL_SHA256_HPP - -#include <memory> - -#include "src/buildtool/crypto/hasher.hpp" - -[[nodiscard]] extern auto CreateHashImplSha256() - -> std::unique_ptr<Hasher::IHashImpl>; - -#endif // INCLUDED_SRC_BUILDTOOL_CRYPTO_HASH_IMPL_SHA256_HPP |