![]() |
Qt 6.x
The Qt SDK
|
#include <qcryptographichash.h>
#include <qmessageauthenticationcode.h>
#include <qiodevice.h>
#include <qmutex.h>
#include <qvarlengtharray.h>
#include <private/qlocking_p.h>
#include <array>
#include <climits>
#include <numeric>
#include "../../3rdparty/sha1/sha1.cpp"
#include "../../3rdparty/rfc6234/sha.h"
#include "../../3rdparty/md5/md5.h"
#include "../../3rdparty/md5/md5.cpp"
#include "../../3rdparty/md4/md4.h"
#include "../../3rdparty/md4/md4.cpp"
#include "../../3rdparty/sha3/KeccakSponge.c"
#include "../../3rdparty/sha3/KeccakNISTInterface.c"
#include "../../3rdparty/sha3/KeccakF-1600-opt32.c"
#include "../../3rdparty/rfc6234/sha224-256.c"
#include "../../3rdparty/rfc6234/sha384-512.c"
#include "qtcore-config_p.h"
#include "../../3rdparty/blake2/src/blake2b-ref.c"
#include "../../3rdparty/blake2/src/blake2s-ref.c"
#include "moc_qcryptographichash.cpp"
Go to the source code of this file.
Classes | |
class | QSmallByteArray< N > |
class | QCryptographicHashPrivate |
union | QCryptographicHashPrivate::State |
class | QMessageAuthenticationCodePrivate |
Macros | |
#define | CASE(Enum, Size) |
Typedefs | |
typedef unsigned char | BitSequence |
typedef unsigned long long | DataLength |
typedef spongeState | hashState |
typedef spongeState | SHA3Context |
typedef HashReturn() | SHA3Init(hashState *state, int hashbitlen) |
typedef HashReturn() | SHA3Update(hashState *state, const BitSequence *data, DataLength databitlen) |
typedef HashReturn() | SHA3Final(hashState *state, BitSequence *hashval) |
using | HashResult = QSmallByteArray< maxHashLength()> |
using | HashBlock = QSmallByteArray< maxHashBlockSize()> |
Enumerations | |
enum | HashReturn { SUCCESS = 0 , FAIL = 1 , BAD_HASHLEN = 2 } |
Functions | |
static int | SHA224_256AddLength (SHA256Context *context, unsigned int length) |
static int | SHA384_512AddLength (SHA512Context *context, unsigned int length) |
static constexpr int | hashLengthInternal (QCryptographicHash::Algorithm method) noexcept |
static constexpr int | maxHashLength () |
static constexpr int | qt_hash_block_size (QCryptographicHash::Algorithm method) |
constexpr int | maxHashBlockSize () |
constexpr int | minHashBlockSize () |
constexpr int | gcdHashBlockSize () |
static HashBlock | xored (const HashBlock &block, quint8 val) noexcept |
Variables | |
static Q_CONSTINIT SHA3Init *const | sha3Init = Init |
static Q_CONSTINIT SHA3Update *const | sha3Update = Update |
static Q_CONSTINIT SHA3Final *const | sha3Final = Final |
#define CASE | ( | Enum, | |
Size | |||
) |
typedef unsigned char BitSequence |
Definition at line 35 of file qcryptographichash.cpp.
typedef unsigned long long DataLength |
Definition at line 36 of file qcryptographichash.cpp.
using HashBlock = QSmallByteArray<maxHashBlockSize()> |
Definition at line 1287 of file qcryptographichash.cpp.
using HashResult = QSmallByteArray<maxHashLength()> |
Definition at line 248 of file qcryptographichash.cpp.
typedef spongeState hashState |
Definition at line 44 of file qcryptographichash.cpp.
typedef spongeState SHA3Context |
Definition at line 51 of file qcryptographichash.cpp.
typedef HashReturn() SHA3Final(hashState *state, BitSequence *hashval) |
Definition at line 54 of file qcryptographichash.cpp.
typedef HashReturn() SHA3Init(hashState *state, int hashbitlen) |
Definition at line 52 of file qcryptographichash.cpp.
typedef HashReturn() SHA3Update(hashState *state, const BitSequence *data, DataLength databitlen) |
Definition at line 53 of file qcryptographichash.cpp.
enum HashReturn |
Enumerator | |
---|---|
SUCCESS | |
FAIL | |
BAD_HASHLEN |
Definition at line 37 of file qcryptographichash.cpp.
|
constexpr |
Definition at line 1278 of file qcryptographichash.cpp.
References A, i, qt_hash_block_size(), and QCryptographicHashPrivate::result.
Referenced by xored().
|
staticconstexprnoexcept |
Definition at line 194 of file qcryptographichash.cpp.
References QCryptographicHash::Blake2b_160, QCryptographicHash::Blake2b_256, QCryptographicHash::Blake2b_384, QCryptographicHash::Blake2b_512, QCryptographicHash::Blake2s_160, QCryptographicHash::Blake2s_224, QCryptographicHash::Blake2s_256, CASE, QCryptographicHash::Keccak_224, QCryptographicHash::Keccak_256, QCryptographicHash::Keccak_384, QCryptographicHash::Keccak_512, method, QCryptographicHash::NumAlgorithms, QCryptographicHash::RealSha3_224, QCryptographicHash::RealSha3_256, QCryptographicHash::RealSha3_384, and QCryptographicHash::RealSha3_512.
Referenced by QCryptographicHashPrivate::State::finalizeUnchecked(), QCryptographicHash::hashLength(), maxHashLength(), QCryptographicHashPrivate::State::reset(), and QMessageAuthenticationCodePrivate::setKey().
|
constexpr |
Definition at line 1258 of file qcryptographichash.cpp.
References A, i, qt_hash_block_size(), and QCryptographicHashPrivate::result.
Referenced by xored().
|
staticconstexpr |
Definition at line 239 of file qcryptographichash.cpp.
References A, hashLengthInternal(), and i.
|
constexpr |
Definition at line 1268 of file qcryptographichash.cpp.
References A, i, qt_hash_block_size(), and QCryptographicHashPrivate::result.
Referenced by xored().
|
staticconstexpr |
Definition at line 1207 of file qcryptographichash.cpp.
References QCryptographicHash::Blake2b_160, QCryptographicHash::Blake2b_256, QCryptographicHash::Blake2b_384, QCryptographicHash::Blake2b_512, QCryptographicHash::Blake2s_128, QCryptographicHash::Blake2s_160, QCryptographicHash::Blake2s_224, QCryptographicHash::Blake2s_256, QCryptographicHash::Keccak_224, QCryptographicHash::Keccak_256, QCryptographicHash::Keccak_384, QCryptographicHash::Keccak_512, QCryptographicHash::Md4, QCryptographicHash::Md5, QCryptographicHashPrivate::method, QCryptographicHash::NumAlgorithms, QCryptographicHash::RealSha3_224, QCryptographicHash::RealSha3_256, QCryptographicHash::RealSha3_384, QCryptographicHash::RealSha3_512, QCryptographicHash::Sha1, QCryptographicHash::Sha224, QCryptographicHash::Sha256, QCryptographicHash::Sha384, and QCryptographicHash::Sha512.
Referenced by gcdHashBlockSize(), maxHashBlockSize(), minHashBlockSize(), and QMessageAuthenticationCodePrivate::setKey().
|
inlinestatic |
Definition at line 95 of file qcryptographichash.cpp.
References context.
|
inlinestatic |
Definition at line 100 of file qcryptographichash.cpp.
References context.
Definition at line 1289 of file qcryptographichash.cpp.
References gcdHashBlockSize(), i, maxHashBlockSize(), minHashBlockSize(), and QCryptographicHashPrivate::result.
Referenced by QMessageAuthenticationCodePrivate::finalizeUnchecked(), and QMessageAuthenticationCodePrivate::initMessageHash().
Definition at line 70 of file qcryptographichash.cpp.
Referenced by QCryptographicHashPrivate::State::sha3Finish().
|
static |
Definition at line 68 of file qcryptographichash.cpp.
Referenced by QCryptographicHashPrivate::State::reset().
|
static |
Definition at line 69 of file qcryptographichash.cpp.
Referenced by QCryptographicHashPrivate::State::addData(), and QCryptographicHashPrivate::State::sha3Finish().