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:
parent
b326ef7343
commit
1cf359def7
@ -616,7 +616,6 @@ void QCryptographicHashPrivate::addData(QByteArrayView bytes) noexcept
|
|||||||
method == QCryptographicHash::Blake2s_224) {
|
method == QCryptographicHash::Blake2s_224) {
|
||||||
blake2s_update(&blake2sContext, reinterpret_cast<const uint8_t *>(data), length);
|
blake2s_update(&blake2sContext, reinterpret_cast<const uint8_t *>(data), length);
|
||||||
} else if (!initializationFailed) {
|
} else if (!initializationFailed) {
|
||||||
result.resizeForOverwrite(EVP_MD_get_size(algorithm.get()));
|
|
||||||
const int ret = EVP_DigestUpdate(context.get(), (const unsigned char *)data, length);
|
const int ret = EVP_DigestUpdate(context.get(), (const unsigned char *)data, length);
|
||||||
Q_UNUSED(ret);
|
Q_UNUSED(ret);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user