Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Doc/library/secrets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ The :mod:`secrets` module provides functions for generating secure
tokens, suitable for applications such as password resets,
hard-to-guess URLs, and similar.

.. data:: DEFAULT_ENTROPY

The default number of bytes of randomness used by the ``token_*``
functions when *nbytes* is not specified. This is an opaque value
that may change at any time, including during maintenance releases.
Users who need a specific amount of entropy should explicitly pass
the *nbytes* argument.

.. function:: token_bytes([nbytes=None])

Return a random byte string containing *nbytes* number of bytes.
Expand Down
Loading