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:
parent
81ca8aa4ab
commit
2a726582b7
@ -204,6 +204,8 @@ static constexpr int maxHashLength()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using HashResult = QSmallByteArray<maxHashLength()>;
|
||||||
|
|
||||||
#ifdef USING_OPENSSL30
|
#ifdef USING_OPENSSL30
|
||||||
static constexpr const char * methodToName(QCryptographicHash::Algorithm method) noexcept
|
static constexpr const char * methodToName(QCryptographicHash::Algorithm method) noexcept
|
||||||
{
|
{
|
||||||
@ -301,7 +303,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
// protects result in finalize()
|
// protects result in finalize()
|
||||||
QBasicMutex finalizeMutex;
|
QBasicMutex finalizeMutex;
|
||||||
QSmallByteArray<maxHashLength()> result;
|
HashResult result;
|
||||||
|
|
||||||
const QCryptographicHash::Algorithm method;
|
const QCryptographicHash::Algorithm method;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user