From 4fcd42afd3ba92f909b48be72c9392314689ec89 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 14 Jul 2020 21:16:07 +0200 Subject: comphelper: don't hardcode hash sizes in Hash::getLength() Instead move the constants from filter to comphelper and reuse them. Change-Id: Ib7061e9028ccf6067b4e86f50145c1472c2b01d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98785 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- comphelper/source/misc/hash.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index 119044985bc5..6b54ed0a2452 100644 --- a/comphelper/source/misc/hash.cxx +++ b/comphelper/source/misc/hash.cxx @@ -139,13 +139,13 @@ size_t Hash::getLength() const switch (mpImpl->meType) { case HashType::MD5: - return 16; + return MD5_HASH_LENGTH; case HashType::SHA1: - return 20; + return SHA1_HASH_LENGTH; case HashType::SHA256: - return 32; + return SHA256_HASH_LENGTH; case HashType::SHA512: - return 64; + return SHA512_HASH_LENGTH; } return 0; -- cgit