[Development] websockets (was RE: Qt 5.3 Feature freeze is coming quite soon...)

Thiago Macieira thiago.macieira at intel.com
Mon Feb 10 06:35:18 CET 2014


Em dom 09 fev 2014, às 23:57:24, Olivier Goffart escreveu:
> I think you are making it more complicated than it  need to be.
> qrand has maximum 32bit entropy (because it uses rand_r internally which
> only  has 32 bit state), therefore calling it several time in a row is
> totally useless and don't add entropy.

Actually, on most platforms it returns only 15 bits of data.

If you want to make multiple calls, I want to see RAND_MAX in the source code.

> static QElapsedTimer t;
> return qsrand(t.nsecsElapsed());

You forgot to start() the timer. Which means this is a really poor choice for 
seeing the random engine, since a newly-started elapsed timer will be very 
close to zero.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list