"Tim Starling" posted a comment on MediaWiki.r111964.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/111964#c32011

Commit summary for MediaWiki.r111964:

Commit a new cryptographic random generator class for use in MediaWiki.
Waiting for it to be reviewed before actually making use of it inside code and 
adding a RELEASE-NOTES entry.

Tim Starling's comment:

Could you keep the state in a singleton object instead of using static 
variables?

I strongly recommend using stream_set_read_buffer($urandom, 0) and reading only 
the minimum number of bytes from /dev/urandom, instead of reading an 8KB block 
and throwing away 4KB. My testing indicates that this will speed up the 
function by a factor of 100 or so for most applications, and avoid depleting 
the system entropy pool.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to