QCryptographicHash: give the result container a catchy name

Repeating QSmallByteArray<maxHashLength()> when reusing the type for
QMessageAuthenticationCode isn't DRY.

Pick-to: 6.5
Change-Id: I6d5ca2c14c5ea696a4d28eeb1fb384ff5671d161
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2023-02-23 15:09:39 +01:00
parent 81ca8aa4ab
commit 2a726582b7

View File

@ -204,6 +204,8 @@ static constexpr int maxHashLength()
return result;
}
using HashResult = QSmallByteArray<maxHashLength()>;
#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<maxHashLength()> result;
HashResult result;
const QCryptographicHash::Algorithm method;
};