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_sha1.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/buildtool/crypto/hash_impl_sha1.cpp') diff --git a/src/buildtool/crypto/hash_impl_sha1.cpp b/src/buildtool/crypto/hash_impl_sha1.cpp index 97ff5464..d188f9cf 100644 --- a/src/buildtool/crypto/hash_impl_sha1.cpp +++ b/src/buildtool/crypto/hash_impl_sha1.cpp @@ -51,6 +51,10 @@ class HashImplSha1 final : public Hasher::IHashImpl { return {}; } + [[nodiscard]] auto GetHashLength() const noexcept -> size_t final { + return SHA_DIGEST_LENGTH * kCharsPerNumber; + } + private: SHA_CTX ctx_{}; bool initialized_{}; -- cgit v1.2.3