diff options
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qcryptographichash.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qmessageauthenticationcode.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/tools.pri | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 9f98475dc0..d5a6c4e5a0 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -165,8 +165,12 @@ static inline int SHA384_512AddLength(SHA512Context *context, unsigned int lengt return SHA384_512AddLengthM(context, length); } +#if QT_CONFIG(system_libb2) +#include <blake2.h> +#else #include "../../3rdparty/blake2/src/blake2b-ref.c" #include "../../3rdparty/blake2/src/blake2s-ref.c" +#endif #endif // QT_CRYPTOGRAPHICHASH_ONLY_SHA1 QT_BEGIN_NAMESPACE diff --git a/src/corelib/tools/qmessageauthenticationcode.cpp b/src/corelib/tools/qmessageauthenticationcode.cpp index d84b1b0b6c..ada502ecb8 100644 --- a/src/corelib/tools/qmessageauthenticationcode.cpp +++ b/src/corelib/tools/qmessageauthenticationcode.cpp @@ -40,6 +40,8 @@ #include "qmessageauthenticationcode.h" #include "qvarlengtharray.h" +#include "qtcore-config_p.h" + /* These #defines replace the typedefs needed by the RFC6234 code. Normally the typedefs would come from from stdint.h, but since this header is not @@ -75,7 +77,11 @@ // sha1.h - commented out '#include <stdint.h>' on line 74 #include "../../3rdparty/rfc6234/sha.h" +#if QT_CONFIG(system_libb2) +#include <blake2.h> +#else #include "../../3rdparty/blake2/src/blake2.h" +#endif #undef uint64_t #undef uint32_t diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index 4d3b5e25ff..c8ce79ce36 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -99,6 +99,10 @@ qtConfig(system-doubleconversion) { include($$PWD/../../3rdparty/double-conversion/double-conversion.pri) } +qtConfig(system-libb2) { + QMAKE_USE_PRIVATE += libb2 +} + qtConfig(easingcurve) { HEADERS += \ tools/qeasingcurve.h \ |