From: Antoine Pitrou Date: Fri, 16 Aug 2013 17:19:40 +0000 (+0200) Subject: Issue #16190: fix random module recommendation to use ssl.RAND_bytes(). X-Git-Tag: v2.7.6rc1~236 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79a16a85aa1f9e23abee9fb01cdb92bf1bcddf1b;p=thirdparty%2FPython%2Fcpython.git Issue #16190: fix random module recommendation to use ssl.RAND_bytes(). --- diff --git a/Doc/library/random.rst b/Doc/library/random.rst index b1df231e7369..1bc998940dcd 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -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: