Skip to content

Commit 90e8e81

Browse files
mithunsasidharancjihrig
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 <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 09181eb commit 90e8e81

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
@@ -1969,6 +1969,7 @@ added: v6.6.0
19691969
- `a` {Buffer | TypedArray | DataView}
19701970
- `b` {Buffer | TypedArray | DataView}
19711971

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

0 commit comments

Comments
 (0)