From 81f251660026fff198daf8920edc62bbc782ff7d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 12 Oct 2017 14:59:51 -0700 Subject: QRandomGenerator: add system() and global() Right now,this does really nothing. This commit is just to allow us to transition the other modules (besides qtbase) to use the syntax that will become the API. I've marked three places to use the system CSPRNG: 1) the QHash seed 2) QUuid 3) QAuthenticator I didn't think the HTTP multipart boundary needed to be cryptographically safe, so I changed that one to the global generator. Change-Id: Ib17dde1a1dbb49a7bba8fffd14ecf1938bd8ff61 Reviewed-by: Edward Welbourne --- src/corelib/tools/qhash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools') diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 485c6591c2..ded9ad354e 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -296,7 +296,7 @@ static uint qt_create_qhash_seed() return seed; } - seed = QRandomGenerator::generate(); + seed = QRandomGenerator::system()->generate(); #endif // QT_BOOTSTRAPPED return seed; -- cgit v1.2.3