From cdea74b26d44eeb2baa9abb57b761a28228a6189 Mon Sep 17 00:00:00 2001 From: Mithun Sasidharan Date: Mon, 30 Oct 2017 21:22:18 +0530 Subject: [PATCH] doc : Include 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. Fixes: https://github.com/nodejs/node/pull/16604 --- doc/api/crypto.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index fa0804b86fe15c..86d289cc661a5b 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1969,6 +1969,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