Skip to content

Commit 101eb98

Browse files
mithunsasidharanMylesBorins
authored andcommitted
doc : mention constant-time in crypto doc
Included reference to 'constant time' in crypto.timingSafeEqual description. The Node website would score higher on a Google search and the API would be more discoverable if it used the words "constant time" in its description. PR-URL: #16604 Fixes: #16504 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 290df5a commit 101eb98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doc/api/crypto.md

+1
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,7 @@ All paddings are defined in `crypto.constants`.
14651465
added: v6.6.0
14661466
-->
14671467

1468+
This function is based on a constant-time algorithm.
14681469
Returns true if `a` is equal to `b`, without leaking timing information that
14691470
would allow an attacker to guess one of the values. This is suitable for
14701471
comparing HMAC digests or secret values like authentication cookies or

0 commit comments

Comments
 (0)