Ensure that bootstrapped users of QCryptographicHash only use SHA-1
This reduces code size quite considerably in the bootstrapped tools. Change-Id: I7475650b1936e93afcf327cb4def2f7763609179 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
d5ed6936be
commit
37215efeea
@ -45,6 +45,10 @@
|
||||
|
||||
#include "../../3rdparty/sha1/sha1.cpp"
|
||||
|
||||
#if defined(QT_BOOTSTRAPPED) && !defined(QT_CRYPTOGRAPHICHASH_ONLY_SHA1)
|
||||
# error "Are you sure you need the other hashing algorithms besides SHA-1?"
|
||||
#endif
|
||||
|
||||
#ifndef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
|
||||
// qdoc and qmake only need SHA-1
|
||||
#include "../../3rdparty/md5/md5.h"
|
||||
|
@ -55,9 +55,12 @@ class Q_CORE_EXPORT QCryptographicHash
|
||||
{
|
||||
public:
|
||||
enum Algorithm {
|
||||
#ifndef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
|
||||
Md4,
|
||||
Md5,
|
||||
Sha1,
|
||||
#endif
|
||||
Sha1 = 2,
|
||||
#ifndef QT_CRYPTOGRAPHICHASH_ONLY_SHA1
|
||||
Sha224,
|
||||
Sha256,
|
||||
Sha384,
|
||||
@ -66,6 +69,7 @@ public:
|
||||
Sha3_256,
|
||||
Sha3_384,
|
||||
Sha3_512
|
||||
#endif
|
||||
};
|
||||
|
||||
explicit QCryptographicHash(Algorithm method);
|
||||
|
Loading…
x
Reference in New Issue
Block a user