Mark QMessageAuthenticationCodePrivate::initMessageHash() as noexcept

It only calls other noexcept functions:
- QCryptographicHash::addData(QByteArrayView)
- xored()

Pick-to: 6.5
Task-number: QTBUG-111688
Change-Id: Idd8c485a48b8243b359638086c373288c1c6f96d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2023-03-02 18:56:43 +01:00
parent 590172ccc5
commit 50389d4973

View File

@ -1157,7 +1157,7 @@ public:
const QCryptographicHash::Algorithm method; const QCryptographicHash::Algorithm method;
void setKey(QByteArrayView k) noexcept; void setKey(QByteArrayView k) noexcept;
void initMessageHash(); void initMessageHash() noexcept;
void finalize(); void finalize();
// when not called from the static hash() function, this function needs to be // when not called from the static hash() function, this function needs to be
@ -1208,7 +1208,7 @@ void QMessageAuthenticationCodePrivate::setKey(QByteArrayView newKey) noexcept
This function assumes that messageHash is in its initial state (reset() has This function assumes that messageHash is in its initial state (reset() has
been called). been called).
*/ */
void QMessageAuthenticationCodePrivate::initMessageHash() void QMessageAuthenticationCodePrivate::initMessageHash() noexcept
{ {
messageHash.addData(xored(key, 0x36)); messageHash.addData(xored(key, 0x36));
} }