![]() |
Qt 6.x
The Qt SDK
|
#include <stdlib.h>
#include <stdint.h>
#include "qhash.h"
#include <qbitarray.h>
#include <qstring.h>
#include <qglobal.h>
#include <qbytearray.h>
#include <qdatetime.h>
#include <qbasicatomic.h>
#include <qendian.h>
#include <private/qrandom_p.h>
#include <private/qsimd_p.h>
#include <qcoreapplication.h>
#include <qrandom.h>
#include <private/qlocale_tools_p.h>
#include <array>
#include <limits.h>
#include <assert.h>
Go to the source code of this file.
Macros | |
#define | _CRT_RAND_S |
#define | Q_DECL_HOT_FUNCTION |
#define | cROUNDS 1 |
#define | dROUNDS 2 |
#define | ROTL(x, b) (uint32_t)(((x) << (b)) | ((x) >> (32 - (b)))) |
#define | SIPROUND |
Functions | |
Q_NEVER_INLINE static Q_DECL_HOT_FUNCTION uint64_t | murmurhash (const void *key, uint64_t len, uint64_t seed) noexcept |
Q_NEVER_INLINE static Q_DECL_HOT_FUNCTION uint | siphash (const uint8_t *in, uint inlen, uint seed, uint seed2) |
size_t | qHashBits (const void *p, size_t size, size_t seed) noexcept |
size_t | qHash (QByteArrayView key, size_t seed) noexcept |
size_t | qHash (QStringView key, size_t seed) noexcept |
size_t | qHash (const QBitArray &bitArray, size_t seed) noexcept |
size_t | qHash (QLatin1StringView key, size_t seed) noexcept |
uint | qt_hash (QStringView key, uint chained) noexcept |
Variables | |
QT_BEGIN_NAMESPACE | |
static Q_CONSTINIT HashSeedStorage | qt_qhash_seed |
#define SIPROUND |
|
inlinestaticnoexcept |
Definition at line 236 of file qhash.cpp.
References seed.
Referenced by QHash< Key, T >::qHash(), QHash< Key, T >::qHash(), and QHash< Key, T >::qHashBits().
|
related |
|
noexcept |
Definition at line 956 of file qhash.cpp.
References qHashBits(), and seed.
|
related |
|
related |
|
related |
Definition at line 924 of file qhash.cpp.
Referenced by QTlsPrivate::X509CertificateOpenSSL::hash(), qHash(), qHash(), qHash(), qHash(), qHash(), QHash< Key, T >::qHash(), and QStringView::qHash().
|
noexcept |
Private copy of the implementation of the Qt 4 qHash algorithm for strings, (that is, QChar-based arrays, so all QString-like classes), to be used wherever the result is somehow stored or reused across multiple Qt versions. The public qHash implementation can change at any time, therefore one must not rely on the fact that it will always give the same results.
The qt_hash functions must never change their results.
This function can hash discontiguous memory by invoking it on each chunk, passing the previous's result in the next call's chained argument.
Definition at line 1146 of file qhash.cpp.
Referenced by QResourceRoot::findNode(), qt_rcc_compare_hash::operator()(), and RCCFileInfo::writeDataName().
|
static |
|
static |
Definition at line 170 of file qhash.cpp.
Referenced by QHashSeed::globalSeed(), QHash< Key, T >::qHashBits(), QHashSeed::resetRandomGlobalSeed(), and QHashSeed::setDeterministicGlobalSeed().