From 4780449b4ea008d1bfd7a2625a2d4da804295921 Mon Sep 17 00:00:00 2001 From: Alex Agranov Date: Thu, 13 Jan 2022 16:49:37 -0700 Subject: [PATCH] doc: update timingSafeEqual error case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/41507 Reviewed-By: Tobias Nießen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Filip Skokan --- doc/api/crypto.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 485ec482faa100..376cb2ac4dece1 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -5313,7 +5313,8 @@ comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they -must have the same byte length. +must have the same byte length. An error is thrown if `a` and `b` have +different byte lengths. If at least one of `a` and `b` is a `TypedArray` with more than one byte per entry, such as `Uint16Array`, the result will be computed using the platform