From: Berker Peksag Date: Fri, 10 Apr 2015 13:19:13 +0000 (+0300) Subject: Issue #23025: Add a mention of os.urandom to RAND_bytes and RAND_pseudo_bytes docs. X-Git-Tag: v3.5.0a4~102^2~5^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb7a97c48e34dd3b68a8b2db5839699d43642ec4;p=python Issue #23025: Add a mention of os.urandom to RAND_bytes and RAND_pseudo_bytes docs. Patch by Alex Gaynor. --- diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 465bf8f219..141dcb2c89 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -292,6 +292,8 @@ Random generation can be used to check the status of the PRNG and :func:`RAND_add` can be used to seed the PRNG. + For almost all applications :func:`os.urandom` is preferable. + Read the Wikipedia article, `Cryptographically secure pseudorandom number generator (CSPRNG) `_, @@ -311,6 +313,8 @@ Random generation for non-cryptographic purposes and for certain purposes in cryptographic protocols, but usually not for key generation etc. + For almost all applications :func:`os.urandom` is preferable. + .. versionadded:: 3.3 .. function:: RAND_status()