From 79a16a85aa1f9e23abee9fb01cdb92bf1bcddf1b Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 16 Aug 2013 19:19:40 +0200 Subject: Issue #16190: fix random module recommendation to use ssl.RAND_bytes(). --- Doc/library/random.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/library/random.rst b/Doc/library/random.rst index b1df231..1bc9989 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: -- cgit v0.12