We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
secrets.compare_digest
1 parent ec2b76a commit 47d673dCopy full SHA for 47d673d
Doc/library/secrets.rst
@@ -128,7 +128,9 @@ Other functions
128
129
.. function:: compare_digest(a, b)
130
131
- Return ``True`` if strings *a* and *b* are equal, otherwise ``False``,
+ Return ``True`` if strings or
132
+ :term:`bytes-like objects <bytes-like object>`
133
+ *a* and *b* are equal, otherwise ``False``,
134
using a "constant-time compare" to reduce the risk of
135
`timing attacks <https://codahale.com/a-lesson-in-timing-attacks/>`_.
136
See :func:`hmac.compare_digest` for additional details.
0 commit comments