[Python-checkins] cpython (merge 3.3 -> default): merge with 3.3

georg.brandl python-checkins at python.org
Sun Oct 6 18:56:23 CEST 2013


http://hg.python.org/cpython/rev/b0295cc736d8
changeset:   86108:b0295cc736d8
parent:      86104:ec3b9977590a
parent:      86107:176bb5a98463
user:        Georg Brandl <georg at python.org>
date:        Sun Oct 06 18:48:30 2013 +0200
summary:
  merge with 3.3

files:
  Doc/library/os.rst |  5 +++--
  Python/random.c    |  5 +++--
  2 files changed, 6 insertions(+), 4 deletions(-)


diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -3377,8 +3377,9 @@
    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
+   ``CryptGenRandom()``.  If a randomness source is not found,
+   :exc:`NotImplementedError` will be raised.
 
    For an easy-to-use interface to the random number generator
    provided by your platform, please see :class:`random.SystemRandom`.
diff --git a/Python/random.c b/Python/random.c
--- a/Python/random.c
+++ b/Python/random.c
@@ -218,8 +218,9 @@
     }
 }
 
-/* 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 system 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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list