From f7296f50103dc9320ffa1127640c843b227adfdd Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Mon, 22 Apr 2024 13:23:30 +0200 Subject: Compactification: Obtain hash string length from hasher. --- src/buildtool/crypto/hash_impl_sha512.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/buildtool/crypto/hash_impl_sha512.cpp') diff --git a/src/buildtool/crypto/hash_impl_sha512.cpp b/src/buildtool/crypto/hash_impl_sha512.cpp index 4b96e470..41ca792b 100644 --- a/src/buildtool/crypto/hash_impl_sha512.cpp +++ b/src/buildtool/crypto/hash_impl_sha512.cpp @@ -51,6 +51,10 @@ class HashImplSha512 final : public Hasher::IHashImpl { return {}; } + [[nodiscard]] auto GetHashLength() const noexcept -> size_t final { + return SHA512_DIGEST_LENGTH * kCharsPerNumber; + } + private: SHA512_CTX ctx_{}; bool initialized_{}; -- cgit v1.2.3