QCryptographicHash[OpenSSL]: do not resize result when adding data

This is unnecessary and basically doesn't have any effect.

Change-Id: I6b63e989c43bdcd55bf83d2c0756da2de1ab49df
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit a647d18df22d3aa8bfa3f4c1dbb1340095f0d200)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Jan Grulich 2023-01-11 12:19:18 +01:00 committed by Qt Cherry-pick Bot
parent b326ef7343
commit 1cf359def7

View File

@ -616,7 +616,6 @@ void QCryptographicHashPrivate::addData(QByteArrayView bytes) noexcept
method == QCryptographicHash::Blake2s_224) {
blake2s_update(&blake2sContext, reinterpret_cast<const uint8_t *>(data), length);
} else if (!initializationFailed) {
result.resizeForOverwrite(EVP_MD_get_size(algorithm.get()));
const int ret = EVP_DigestUpdate(context.get(), (const unsigned char *)data, length);
Q_UNUSED(ret);
}