summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcryptographichash.h
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2019-11-28 19:42:23 +0100
committerLinus Jahn <lnj@kaidan.im>2020-07-31 15:05:18 +0200
commit5d69aa3ee1214cf689e2357bff8688f2ff138471 (patch)
tree7889ec6c3761977faea4f659d867c8a5ba6a3e35 /src/corelib/tools/qcryptographichash.h
parent06f7a24574376fae099f276337f5564d27a5787b (diff)
QCryptographicHash: Add BLAKE2b and BLAKE2s hashing algorithms
BLAKE2 does not specify requirements about specific hash sizes and since QCryptographicHash does not support dynamic hash sizes, only the most common hash sizes could be covered by this. The supported hash sizes were chosen to match the ones supported by the Linux kernel. The new hashing algorithms for QCryptographicHash are: * BLAKE2b (160 bit, 256 bit, 384 bit, 512 bit) * BLAKE2s (128 bit, 160 bit, 224 bit, 256 bit) [ChangeLog][QtCore][QCryptographicHash] Added BLAKE2b and BLAKE2s hashing algorithms. Fixes: QTBUG-78198 Change-Id: Id9e0180a974093982fdf1cdd6180988a2e5e9f4f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qcryptographichash.h')
-rw-r--r--src/corelib/tools/qcryptographichash.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/corelib/tools/qcryptographichash.h b/src/corelib/tools/qcryptographichash.h
index f76fe2d013..bef0c4dbe1 100644
--- a/src/corelib/tools/qcryptographichash.h
+++ b/src/corelib/tools/qcryptographichash.h
@@ -78,13 +78,22 @@ public:
Sha3_224 = RealSha3_224,
Sha3_256 = RealSha3_256,
Sha3_384 = RealSha3_384,
- Sha3_512 = RealSha3_512
+ Sha3_512 = RealSha3_512,
# else
Sha3_224 = Keccak_224,
Sha3_256 = Keccak_256,
Sha3_384 = Keccak_384,
- Sha3_512 = Keccak_512
+ Sha3_512 = Keccak_512,
# endif
+
+ Blake2b_160 = 15,
+ Blake2b_256,
+ Blake2b_384,
+ Blake2b_512,
+ Blake2s_128,
+ Blake2s_160,
+ Blake2s_224,
+ Blake2s_256,
#endif
};
Q_ENUM(Algorithm)