diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 8ada1277b6..095d1910a6 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -547,6 +547,12 @@ void QCryptographicHashPrivate::reset() noexcept return; } + if (context && !initializationFailed) { + // everything already set up - just reset the context + EVP_MD_CTX_reset(context.get()); + return; + } + initializationFailed = true; if (method == QCryptographicHash::Md4) {