Skip to content

Commit 26ed4ad

Browse files
marco-ippolitoRafaelGSS
authored andcommitted
doc: deprecate hash constructor
PR-URL: #51077 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent d5c9adf commit 26ed4ad

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/api/deprecations.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3467,6 +3467,21 @@ Type: Documentation-only
34673467
The [`dirent.path`][] is deprecated due to its lack of consistency across
34683468
release lines. Please use [`dirent.parentPath`][] instead.
34693469

3470+
### DEP0179: `Hash` constructor
3471+
3472+
<!-- YAML
3473+
changes:
3474+
- version: REPLACEME
3475+
pr-url: https://github.com/nodejs/node/pull/51077
3476+
description: Documentation-only deprecation.
3477+
-->
3478+
3479+
Type: Documentation-only
3480+
3481+
Calling `Hash` class directly with `Hash()` or `new Hash()` is
3482+
deprecated due to being internals, not intended for public use.
3483+
Please use the [`crypto.createHash()`][] method to create Hash instances.
3484+
34703485
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
34713486
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
34723487
[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.
35053520
[`crypto.createCipheriv()`]: crypto.md#cryptocreatecipherivalgorithm-key-iv-options
35063521
[`crypto.createDecipher()`]: crypto.md#cryptocreatedecipheralgorithm-password-options
35073522
[`crypto.createDecipheriv()`]: crypto.md#cryptocreatedecipherivalgorithm-key-iv-options
3523+
[`crypto.createHash()`]: crypto.md#cryptocreatehashalgorithm-options
35083524
[`crypto.fips`]: crypto.md#cryptofips
35093525
[`crypto.pbkdf2()`]: crypto.md#cryptopbkdf2password-salt-iterations-keylen-digest-callback
35103526
[`crypto.randomBytes()`]: crypto.md#cryptorandombytessize-callback

0 commit comments

Comments
 (0)