This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients christian.heimes, neologix, pitrou, rhettinger, vstinner
Date 2013-08-23.14:34:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377268495.68.0.0309563777888.issue18811@psf.upfronthosting.co.za>
In-reply-to
Content
> How about we generalize SystemRandom so  users can implement
> a custom RNG class wby providing a method rng(amount) -> bytes?

The random module already makes it easy:
"""
Class Random can also be subclassed if you want to use a different basic generator of your own devising: in that case, override the random(), seed(), getstate(), and setstate() methods. Optionally, a new generator can supply a getrandbits() method — this allows randrange() to produce selections over an arbitrarily large range.
"""

> I showed that urandom is just a bit slower than SSL_rand().

"Just a bit" is relative, I read from 2 to 3 times slower, on Linux.

> I don't get it either. urandom is perfectly fine.

Alright, closing then.
History
Date User Action Args
2013-08-23 14:34:55neologixsetrecipients: + neologix, rhettinger, pitrou, vstinner, christian.heimes
2013-08-23 14:34:55neologixsetmessageid: <1377268495.68.0.0309563777888.issue18811@psf.upfronthosting.co.za>
2013-08-23 14:34:55neologixlinkissue18811 messages
2013-08-23 14:34:55neologixcreate