diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-24 19:32:40 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-24 19:32:40 (GMT) |
commit | 19fb53c1195653e87b9197211015c624960c7b95 (patch) | |
tree | 1824b8ebfd999edff2278672b25789b9b1a5b4c1 /Doc/library/random.rst | |
parent | abf22b405fb15835ac9e1a732dee624c1a6c805a (diff) | |
download | cpython-19fb53c1195653e87b9197211015c624960c7b95.zip cpython-19fb53c1195653e87b9197211015c624960c7b95.tar.gz cpython-19fb53c1195653e87b9197211015c624960c7b95.tar.bz2 |
Issue #12049: improve RAND_bytes() and RAND_pseudo_bytes() documentation
Add also a security warning in the module random pointing to ssl.RAND_bytes().
Diffstat (limited to 'Doc/library/random.rst')
-rw-r--r-- | Doc/library/random.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst index f0c4add..52419a1 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -43,6 +43,12 @@ 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 generators of the :mod:`random` module should not be used for security + purposes, they are not cryptographic. Use :func:`ssl.RAND_bytes` if you + require a cryptographically secure pseudorandom number generator. + Bookkeeping functions: |