From 7603d2ed80baf5731ee88b4a8a7b64638eb39699 Mon Sep 17 00:00:00 2001 From: jakecastelli <959672929@qq.com> Date: Wed, 15 May 2024 23:28:31 +0930 Subject: [PATCH 1/4] doc: deprecate NaN or negative number as delay Refs: https://github.com/nodejs/node/pull/46678 --- doc/api/timers.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api/timers.md b/doc/api/timers.md index 3789e9efd00906..fef346a3950fe9 100644 --- a/doc/api/timers.md +++ b/doc/api/timers.md @@ -224,6 +224,10 @@ This method has a custom variant for promises that is available using + +Type: Runtime + +Calling `setTimeout` or `setInterval` with `NaN` or a negative number will +result the process emitting a warning, the warning will only be emitted once per +process. + Applications that intend to use authentication tags that are shorter than the default authentication tag length must set the `authTagLength` option of the [`crypto.createDecipheriv()`][] function to the appropriate length. From 6cf7e84274e49c21e55564bf1d134a396ec1d47a Mon Sep 17 00:00:00 2001 From: jakecastelli <959672929@qq.com> Date: Thu, 16 May 2024 01:28:52 +0930 Subject: [PATCH 4/4] fixup --- doc/api/deprecations.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 4eb034ec7373d6..f629e236c18c53 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -3687,29 +3687,29 @@ changes: Type: Runtime -### DEP0183: Passing `NaN` or a negative number as `delay` +Applications that intend to use authentication tags that are shorter than the +default authentication tag length must set the `authTagLength` option of the +[`crypto.createDecipheriv()`][] function to the appropriate length. + +For ciphers in GCM mode, the [`decipher.setAuthTag()`][] function accepts +authentication tags of any valid length (see [DEP0090](#DEP0090)). This behavior +is deprecated to better align with recommendations per [NIST SP 800-38D][]. + +### DEP0183: Passing `NaN` or a negative number as `delay` in `node:timers` functions -Type: Runtime +Type: Documentation-only Calling `setTimeout` or `setInterval` with `NaN` or a negative number will result the process emitting a warning, the warning will only be emitted once per process. -Applications that intend to use authentication tags that are shorter than the -default authentication tag length must set the `authTagLength` option of the -[`crypto.createDecipheriv()`][] function to the appropriate length. - -For ciphers in GCM mode, the [`decipher.setAuthTag()`][] function accepts -authentication tags of any valid length (see [DEP0090](#DEP0090)). This behavior -is deprecated to better align with recommendations per [NIST SP 800-38D][]. - [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 [RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4