Skip to content

Commit 1bf6250

Browse files
mithunsasidharangibfahn
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 542f3b9 commit 1bf6250

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
@@ -1848,6 +1848,7 @@ added: v6.6.0
18481848
- `a` {Buffer | TypedArray | DataView}
18491849
- `b` {Buffer | TypedArray | DataView}
18501850

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

0 commit comments

Comments
 (0)