diff options
author | Linus Jahn <lnj@kaidan.im> | 2019-12-13 21:19:26 +0100 |
---|---|---|
committer | Linus Jahn <lnj@kaidan.im> | 2020-07-31 15:05:24 +0200 |
commit | c19bafc60c1c2e9a73cb3d212293462a1be4eb47 (patch) | |
tree | 089269cabcc8b75832a6ce3cff8ec5e4020b0de0 /src/corelib/tools/qmessageauthenticationcode.cpp | |
parent | 5d69aa3ee1214cf689e2357bff8688f2ff138471 (diff) |
QtCore: Use system-wide libb2 if present
This adds the option to build Qt with libb2, which is especially
recommended, if you care about the performance of the BLAKE2 hashing
algorithms. The bundled version is the pure reference C implementation
of BLAKE2, while libb2 has many additional hardware optimizations.
However, the API of both is the same, so no changes to the code were
necessary here.
Change-Id: I3563982f4e07be300291fe103c38b16a404b3ebb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/tools/qmessageauthenticationcode.cpp')
-rw-r--r-- | src/corelib/tools/qmessageauthenticationcode.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 |