diff options
author | Davide Beatrici <davidebeatrici@gmail.com> | 2019-09-12 23:08:39 +0300 |
---|---|---|
committer | Davide Beatrici <davidebeatrici@gmail.com> | 2019-09-12 23:08:39 +0300 |
commit | 15831dbca85dd906edbad2bfff2b147527a456e2 (patch) | |
tree | 34bd1c4db9b95748d263aea811e849dec7e5525c /src/murmur/PBKDF2.cpp | |
parent | e29897c784f546dc8c7150811994663818911608 (diff) |
Add missing includes for "no-pch" build
This commit adds all the missing includes when the PCH header is not used.
Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
Diffstat (limited to 'src/murmur/PBKDF2.cpp')
-rw-r--r-- | src/murmur/PBKDF2.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/murmur/PBKDF2.cpp b/src/murmur/PBKDF2.cpp index 2e69b7714..91857ee39 100644 --- a/src/murmur/PBKDF2.cpp +++ b/src/murmur/PBKDF2.cpp @@ -34,8 +34,27 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <QtCore/QtGlobal> + +#ifdef Q_OS_WIN +// <openssl/rand.h> includes <windows.h> without defining NOMINMAX, +// which breaks our compilation because of the "max" macro. +#ifndef NOMINMAX +# define NOMINMAX +#endif +#endif + #include "PBKDF2.h" +#include <QtCore/QElapsedTimer> +#include <QtCore/QLatin1String> + +#include <openssl/err.h> +#include <openssl/evp.h> +#include <openssl/rand.h> + +#include <limits> + int PBKDF2::benchmark() { const QString pseudopass(QLatin1String("aboutAvg")); const QString hexSalt = getSalt(); // Could tolerate not getting a salt here, will likely only make it harder. |