From 81ca8aa4abb4363cf06ba21bd9de04d14b886223 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 22 Feb 2023 07:56:38 +0100 Subject: [PATCH] QMessageAuthenticationCode: make qt_hash_block_size() constexpr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Thiago Macieira --- src/corelib/tools/qcryptographichash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 4a8a8c1c20c..8453a04f105 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -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: