Author pitrou
Recipients mattchaput, pitrou, rhettinger, serhiy.storchaka, terry.reedy, vstinner
Date 2012-04-07.20:06:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> However, I'm not sure of the legitimacy of replacement suitable for
> cryptographic use `os.urandom` on fast pseudo-random
> `random.getrandbits`. Especially for applications that need to generate 
> a lot of uuids.

Agreed. urandom() is supposed to incorporate "real" random, while getrandbits() uses a PRNG.
Also, as the OP shows, it's easy to inject your own random source:

  >>> grb = "uuid.UUID(int=random.getrandbits(128), version=4)"

if you really need the speed.
Date User Action Args
2012-04-07 20:06:38pitrousetrecipients: + pitrou, rhettinger, terry.reedy, vstinner, mattchaput, serhiy.storchaka
2012-04-07 20:06:38pitrousetmessageid: <>
2012-04-07 20:06:38pitroulinkissue12986 messages
2012-04-07 20:06:38pitroucreate