]> granicus.if.org Git - python/commitdiff
Issue #16190: fix random module recommendation to use ssl.RAND_bytes().
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 16 Aug 2013 17:19:40 +0000 (19:19 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 16 Aug 2013 17:19:40 +0000 (19:19 +0200)
Doc/library/random.rst

index b1df231e736953ff7ff53873c77ebef8b95a6bff..1bc998940dcdca9cd20308d47f0513dec7ab8c37 100644 (file)
@@ -60,6 +60,13 @@ The :mod:`random` module also provides the :class:`SystemRandom` class which
 uses the system function :func:`os.urandom` to generate random numbers
 from sources provided by the operating system.
 
+.. warning::
+
+   The pseudo-random generators of this module should not be used for
+   security purposes.  Use :func:`os.urandom` or :class:`SystemRandom` if
+   you require a cryptographically secure pseudo-random number generator.
+
+
 Bookkeeping functions: