diff options
| -rw-r--r-- | Doc/library/secrets.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/secrets.rst b/Doc/library/secrets.rst index dc8e5f4..4405dfc 100644 --- a/Doc/library/secrets.rst +++ b/Doc/library/secrets.rst @@ -128,7 +128,9 @@ Other functions .. function:: compare_digest(a, b) - Return ``True`` if strings *a* and *b* are equal, otherwise ``False``, + Return ``True`` if strings or + :term:`bytes-like objects <bytes-like object>` + *a* and *b* are equal, otherwise ``False``, using a "constant-time compare" to reduce the risk of `timing attacks <https://codahale.com/a-lesson-in-timing-attacks/>`_. See :func:`hmac.compare_digest` for additional details. |
