Skip to content

Commit

Permalink
doc : mention constant-time in crypto doc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mithunsasidharan authored and MylesBorins committed Nov 14, 2017
1 parent 290df5a commit 101eb98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,7 @@ All paddings are defined in `crypto.constants`.
added: v6.6.0
-->

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

0 comments on commit 101eb98

Please sign in to comment.