diff -r 2dd1b056d663 Doc/library/os.rst --- a/Doc/library/os.rst Wed Aug 01 14:53:22 2012 +0200 +++ b/Doc/library/os.rst Wed Aug 01 15:34:07 2012 +0200 @@ -3331,5 +3331,5 @@ Miscellaneous Functions This function returns random bytes from an OS-specific randomness source. The returned data should be unpredictable enough for cryptographic applications, though its exact quality depends on the OS implementation. On a Unix-like - system this will query /dev/urandom, and on Windows it will use CryptGenRandom. - If a randomness source is not found, :exc:`NotImplementedError` will be raised. + system this will query ``/dev/urandom``, and on Windows it will use + :c:func:`CryptGenRandom`. diff -r 2dd1b056d663 Python/random.c --- a/Python/random.c Wed Aug 01 14:53:22 2012 +0200 +++ b/Python/random.c Wed Aug 01 15:34:07 2012 +0200 @@ -219,8 +219,9 @@ lcg_urandom(unsigned int x0, unsigned ch } } -/* Fill buffer with size pseudo-random bytes, not suitable for cryptographic - use, from the operating random number generator (RNG). +/* Fill buffer with size pseudo-random bytes from the operating random number + generator (RNG). It is suitable for for most cryptographic purposes except + long living private keys for asymmetric encryption. Return 0 on success, raise an exception and return -1 on error. */ int