From 26ed4ad01f6f5ab8fec76da84981b41a40b5e454 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Mon, 11 Dec 2023 00:09:14 +0100 Subject: [PATCH] doc: deprecate hash constructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/51077 Reviewed-By: Yagiz Nizipli Reviewed-By: Vinícius Lourenço Claro Cardoso Reviewed-By: James M Snell --- doc/api/deprecations.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 0d99af2ad4ee39..7028ca429e95a1 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -3467,6 +3467,21 @@ Type: Documentation-only The [`dirent.path`][] is deprecated due to its lack of consistency across release lines. Please use [`dirent.parentPath`][] instead. +### DEP0179: `Hash` constructor + + + +Type: Documentation-only + +Calling `Hash` class directly with `Hash()` or `new Hash()` is +deprecated due to being internals, not intended for public use. +Please use the [`crypto.createHash()`][] method to create Hash instances. + [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 @@ -3505,6 +3520,7 @@ release lines. Please use [`dirent.parentPath`][] instead. [`crypto.createCipheriv()`]: crypto.md#cryptocreatecipherivalgorithm-key-iv-options [`crypto.createDecipher()`]: crypto.md#cryptocreatedecipheralgorithm-password-options [`crypto.createDecipheriv()`]: crypto.md#cryptocreatedecipherivalgorithm-key-iv-options +[`crypto.createHash()`]: crypto.md#cryptocreatehashalgorithm-options [`crypto.fips`]: crypto.md#cryptofips [`crypto.pbkdf2()`]: crypto.md#cryptopbkdf2password-salt-iterations-keylen-digest-callback [`crypto.randomBytes()`]: crypto.md#cryptorandombytessize-callback