QMessageAuthenticationCode: make qt_hash_block_size() constexpr

Because we can, and as a preparation for using it to determine the size
of a fixed-size buffer for the HMAC's key material.

Pick-to: 6.5
Change-Id: I4add1115ef6d649baab25a842e1238db8a98bb7d
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-22 07:56:38 +01:00
parent 0411d98192
commit 81ca8aa4ab

View File

@ -950,7 +950,7 @@ bool QCryptographicHashPrivate::supportsAlgorithm(QCryptographicHash::Algorithm
#endif
}
static int qt_hash_block_size(QCryptographicHash::Algorithm method)
static constexpr int qt_hash_block_size(QCryptographicHash::Algorithm method)
{
switch (method) {
case QCryptographicHash::Sha1: