Commit eb7a97c4 authored by Berker Peksag's avatar Berker Peksag

Issue #23025: Add a mention of os.urandom to RAND_bytes and RAND_pseudo_bytes docs.

Patch by Alex Gaynor.
parent ecb75e26
...@@ -292,6 +292,8 @@ Random generation ...@@ -292,6 +292,8 @@ Random generation
can be used to check the status of the PRNG and :func:`RAND_add` can be used can be used to check the status of the PRNG and :func:`RAND_add` can be used
to seed the PRNG. to seed the PRNG.
For almost all applications :func:`os.urandom` is preferable.
Read the Wikipedia article, `Cryptographically secure pseudorandom number Read the Wikipedia article, `Cryptographically secure pseudorandom number
generator (CSPRNG) generator (CSPRNG)
<http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator>`_, <http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator>`_,
...@@ -311,6 +313,8 @@ Random generation ...@@ -311,6 +313,8 @@ Random generation
for non-cryptographic purposes and for certain purposes in cryptographic for non-cryptographic purposes and for certain purposes in cryptographic
protocols, but usually not for key generation etc. protocols, but usually not for key generation etc.
For almost all applications :func:`os.urandom` is preferable.
.. versionadded:: 3.3 .. versionadded:: 3.3
.. function:: RAND_status() .. function:: RAND_status()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment