diff options
-rw-r--r-- | src/buildtool/crypto/hash_impl_sha1.cpp | 12 | ||||
-rw-r--r-- | src/buildtool/crypto/hash_impl_sha256.cpp | 12 | ||||
-rw-r--r-- | src/buildtool/crypto/hash_impl_sha512.cpp | 12 | ||||
-rw-r--r-- | src/buildtool/crypto/hasher.hpp | 5 |
4 files changed, 0 insertions, 41 deletions
diff --git a/src/buildtool/crypto/hash_impl_sha1.cpp b/src/buildtool/crypto/hash_impl_sha1.cpp index d188f9cf..c72046d1 100644 --- a/src/buildtool/crypto/hash_impl_sha1.cpp +++ b/src/buildtool/crypto/hash_impl_sha1.cpp @@ -16,7 +16,6 @@ #include <array> #include <cstdint> -#include <utility> // std::move #include "openssl/sha.h" @@ -40,17 +39,6 @@ class HashImplSha1 final : public Hasher::IHashImpl { return std::nullopt; } - auto Compute(std::string const& data) && noexcept -> std::string final { - if (Update(data)) { - auto digest = std::move(*this).Finalize(); - if (digest) { - return *digest; - } - } - FatalError(); - return {}; - } - [[nodiscard]] auto GetHashLength() const noexcept -> size_t final { return SHA_DIGEST_LENGTH * kCharsPerNumber; } diff --git a/src/buildtool/crypto/hash_impl_sha256.cpp b/src/buildtool/crypto/hash_impl_sha256.cpp index a677807b..8aa4d04f 100644 --- a/src/buildtool/crypto/hash_impl_sha256.cpp +++ b/src/buildtool/crypto/hash_impl_sha256.cpp @@ -16,7 +16,6 @@ #include <array> #include <cstdint> -#include <utility> // std::move #include "openssl/sha.h" @@ -40,17 +39,6 @@ class HashImplSha256 final : public Hasher::IHashImpl { return std::nullopt; } - auto Compute(std::string const& data) && noexcept -> std::string final { - if (Update(data)) { - auto digest = std::move(*this).Finalize(); - if (digest) { - return *digest; - } - } - FatalError(); - return {}; - } - [[nodiscard]] auto GetHashLength() const noexcept -> size_t final { return SHA256_DIGEST_LENGTH * kCharsPerNumber; } diff --git a/src/buildtool/crypto/hash_impl_sha512.cpp b/src/buildtool/crypto/hash_impl_sha512.cpp index 41ca792b..524c966c 100644 --- a/src/buildtool/crypto/hash_impl_sha512.cpp +++ b/src/buildtool/crypto/hash_impl_sha512.cpp @@ -16,7 +16,6 @@ #include <array> #include <cstdint> -#include <utility> // std::move #include "openssl/sha.h" @@ -40,17 +39,6 @@ class HashImplSha512 final : public Hasher::IHashImpl { return std::nullopt; } - auto Compute(std::string const& data) && noexcept -> std::string final { - if (Update(data)) { - auto digest = std::move(*this).Finalize(); - if (digest) { - return *digest; - } - } - FatalError(); - return {}; - } - [[nodiscard]] auto GetHashLength() const noexcept -> size_t final { return SHA512_DIGEST_LENGTH * kCharsPerNumber; } diff --git a/src/buildtool/crypto/hasher.hpp b/src/buildtool/crypto/hasher.hpp index a926fab1..a4779509 100644 --- a/src/buildtool/crypto/hasher.hpp +++ b/src/buildtool/crypto/hasher.hpp @@ -89,11 +89,6 @@ class Hasher { [[nodiscard]] virtual auto Finalize() && noexcept -> std::optional<std::string> = 0; - /// \brief Compute the hash of data and return it as string of raw - /// bytes. - [[nodiscard]] virtual auto Compute(std::string const& data) && noexcept - -> std::string = 0; - /// \brief Obtain length of the resulting hash string. [[nodiscard]] virtual auto GetHashLength() const noexcept -> size_t = 0; |