From 2a726582b76f1253db035226a76b0dd7946331fb Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 23 Feb 2023 15:09:39 +0100 Subject: [PATCH] QCryptographicHash: give the result container a catchy name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Repeating QSmallByteArray when reusing the type for QMessageAuthenticationCode isn't DRY. Pick-to: 6.5 Change-Id: I6d5ca2c14c5ea696a4d28eeb1fb384ff5671d161 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Thiago Macieira --- src/corelib/tools/qcryptographichash.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 8453a04f105..ef5100c359a 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -204,6 +204,8 @@ static constexpr int maxHashLength() return result; } +using HashResult = QSmallByteArray; + #ifdef USING_OPENSSL30 static constexpr const char * methodToName(QCryptographicHash::Algorithm method) noexcept { @@ -301,7 +303,7 @@ public: #endif // protects result in finalize() QBasicMutex finalizeMutex; - QSmallByteArray result; + HashResult result; const QCryptographicHash::Algorithm method; };