rtl_random_createPool explicit seeding with systemTime considered redundant?

Thorsten Behrens thb at libreoffice.org
Thu Dec 7 01:59:54 UTC 2017

Hi Stephan, dear fellow hackers,

there's a chunk of places in the code, where (cargo-culted?) a random
pool gets fed with current system time, presumably to seed it with
enough entropy:

    TimeValue aTime;
    osl_getSystemTime( &aTime );
    rtlRandomPool aRandomPool = rtl_random_createPool ();
    rtl_random_addBytes ( aRandomPool, &aTime, 8 );

Then again, initPool() in sal/rtl/random.cxx already does the same, so
that really looks redundant?


-- Thorsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20171207/da21f587/attachment.sig>

More information about the LibreOffice mailing list