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 gibfahn committed Nov 14, 2017
1 parent 542f3b9 commit 1bf6250
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 @@ -1848,6 +1848,7 @@ added: v6.6.0
- `a` {Buffer | TypedArray | DataView}
- `b` {Buffer | TypedArray | DataView}

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 1bf6250

Please sign in to comment.