diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/primitives/constant-time.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/constant-time.rst b/docs/hazmat/primitives/constant-time.rst index 632e7c68..7924efca 100644 --- a/docs/hazmat/primitives/constant-time.rst +++ b/docs/hazmat/primitives/constant-time.rst @@ -19,8 +19,10 @@ about the timing attacks on KeyCzar and Java's ``MessageDigest.isEqual()``. .. function:: bytes_eq(a, b) - Compare ``a`` and ``b`` to one another in constant time if they are of the - same length. + Compares ``a`` and ``b`` with one another. If ``a`` and ``b`` have + different lengths, this returns ``False`` immediately. Otherwise it + compares them in a way that takes the same amount of time, regardless of + how many characters are the same between the two. .. doctest:: |