diff options
author | Richard Moore <rich@kde.org> | 2013-02-03 11:33:26 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-09 15:58:09 +0100 |
commit | 20bde28448583eecb1e37b9492eb4dc73b1409fe (patch) | |
tree | 27a086a50f7b2f5ab1fcb2f366e3114921dc1dd3 /src/corelib/tools/qmessageauthenticationcode.cpp | |
parent | d1acaf2b1c60f276dfbe4ed33eb3b6800d99fcbb (diff) |
Add support for SHA3 to QCryptographicHash.
This commit adds SHA3 support to QCryptographicHash. Two implementations
are provided, one optimised for 32 bit and one for 64 bits. The code has
been written to make it easy to add further implementations, for example
ones using NEON instructions on ARM.
Change-Id: I3be9c45bbd4fcc2771d697e7f7ae74e48a831e8f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib/tools/qmessageauthenticationcode.cpp')
-rw-r--r-- | src/corelib/tools/qmessageauthenticationcode.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/tools/qmessageauthenticationcode.cpp b/src/corelib/tools/qmessageauthenticationcode.cpp index 3950f15502..becaaaa704 100644 --- a/src/corelib/tools/qmessageauthenticationcode.cpp +++ b/src/corelib/tools/qmessageauthenticationcode.cpp @@ -81,6 +81,14 @@ static int qt_hash_block_size(QCryptographicHash::Algorithm method) return SHA384_Message_Block_Size; case QCryptographicHash::Sha512: return SHA512_Message_Block_Size; + case QCryptographicHash::Sha3_224: + return 144; + case QCryptographicHash::Sha3_256: + return 136; + case QCryptographicHash::Sha3_384: + return 104; + case QCryptographicHash::Sha3_512: + return 72; } return 0; } |