PySide6.QtCore.QHashSeed¶
- class QHashSeed¶
Added in version 6.2.
Synopsis¶
Methods¶
def
__init__()
Static functions¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
- __init__([d=0])¶
- Parameters:
d – int
Constructs a new
QHashSeed
object usingdata
as the seed.Returns the current global
QHash
seed. The value returned by this function will be zero ifsetDeterministicGlobalSeed()
has been called or if theQT_HASH_SEED
environment variable is set to zero.- static resetRandomGlobalSeed()¶
Reseeds the Qt hashing seed to a new, random value. Calling this function is not necessary, but long-running applications may want to do so after a long period of time in which information about its hash may have been exposed to potential attackers.
If the environment variable
QT_HASH_SEED
is set to zero, calling this function will result in a no-op.Qt never calls this function during the execution of the application, but unless the
QT_HASH_SEED
variable is set to 0, the hash seed returned byglobalSeed()
will be a random value as if this function had been called.- static setDeterministicGlobalSeed()¶
Forces the Qt hash seed to a deterministic value (zero) and asks the
qHash()
functions to use a pre-determined hashing function. This mode is only useful for debugging and should not be used in production code.Regular operation can be restored by calling
resetRandomGlobalSeed()
.