From 140ec5d6e2167692ba5619b368f44a1b07f96a4a Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 4 Jun 2017 11:51:31 -0400 Subject: Fixes #2347 -- link to the stdlib secrets module in our random number generation section (#3669) --- docs/random-numbers.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs') diff --git a/docs/random-numbers.rst b/docs/random-numbers.rst index 8c6b9fdb..c6acd5b1 100644 --- a/docs/random-numbers.rst +++ b/docs/random-numbers.rst @@ -29,4 +29,9 @@ If you need your random number as an integer (for example, for >>> serial = int.from_bytes(os.urandom(20), byteorder="big") +Starting with Python 3.6 the `standard library includes`_ the ``secrets`` +module, which can be used for generating cryptographically secure random +numbers, with specific helpers for text-based formats. + .. _`always use your operating system's provided random number generator`: https://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/ +.. _`standard library includes`: https://docs.python.org/3/library/secrets.html -- cgit v1.2.3