summaryrefslogtreecommitdiff
path: root/src/buildtool/crypto/hash_impl_sha1.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-04-22 13:23:30 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-04-22 14:48:07 +0200
commitf7296f50103dc9320ffa1127640c843b227adfdd (patch)
tree125dac9f76148573b8fea25875bde34d1c97a86d /src/buildtool/crypto/hash_impl_sha1.cpp
parente79f95584bab08191c0b765ad6481308a7ef36a3 (diff)
downloadjustbuild-f7296f50103dc9320ffa1127640c843b227adfdd.tar.gz
Compactification: Obtain hash string length from hasher.
Diffstat (limited to 'src/buildtool/crypto/hash_impl_sha1.cpp')
-rw-r--r--src/buildtool/crypto/hash_impl_sha1.cpp4
1 files changed, 4 insertions, 0 deletions
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_{};