diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-04-22 13:23:30 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-04-22 14:48:07 +0200 |
commit | f7296f50103dc9320ffa1127640c843b227adfdd (patch) | |
tree | 125dac9f76148573b8fea25875bde34d1c97a86d /src/buildtool/crypto/hash_impl_sha256.cpp | |
parent | e79f95584bab08191c0b765ad6481308a7ef36a3 (diff) | |
download | justbuild-f7296f50103dc9320ffa1127640c843b227adfdd.tar.gz |
Compactification: Obtain hash string length from hasher.
Diffstat (limited to 'src/buildtool/crypto/hash_impl_sha256.cpp')
-rw-r--r-- | src/buildtool/crypto/hash_impl_sha256.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buildtool/crypto/hash_impl_sha256.cpp b/src/buildtool/crypto/hash_impl_sha256.cpp index ea96a3ba..a677807b 100644 --- a/src/buildtool/crypto/hash_impl_sha256.cpp +++ b/src/buildtool/crypto/hash_impl_sha256.cpp @@ -51,6 +51,10 @@ class HashImplSha256 final : public Hasher::IHashImpl { return {}; } + [[nodiscard]] auto GetHashLength() const noexcept -> size_t final { + return SHA256_DIGEST_LENGTH * kCharsPerNumber; + } + private: SHA256_CTX ctx_{}; bool initialized_{}; |