]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
📝 Make sure the phrase "constant-time compare" actually appears in the docs (GH-93396...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 6 Jun 2022 16:54:04 +0000 (09:54 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Jun 2022 16:54:04 +0000 (18:54 +0200)
This is purely for SEO as this is the actual generic name for this kind of method and it currently does not appear in a Google search for "python constant time compare". Not creating an issue or setting this up for backports as its trivial (I think) and not a functional change.
(cherry picked from commit 8241a6971e6051ba10040af6b50f9236faa0c892)

Co-authored-by: Noah Kantrowitz <noah@coderanger.net>
Doc/library/secrets.rst

index c22da727b55c9bffc2e561910ec8db3af4d9ec5e..eda4616da5ec9109d865ffc3d68d3d3434f3cac4 100644 (file)
@@ -129,7 +129,7 @@ Other functions
 .. function:: compare_digest(a, b)
 
    Return ``True`` if strings *a* and *b* are equal, otherwise ``False``,
-   in such a way as to reduce the risk of
+   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.