Skip to content

Commit f2b4626

Browse files
marco-ippolitorichardlau
authored andcommittedMar 25, 2024
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 b8f0ea6 commit f2b4626

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎doc/api/deprecations.md

+16
Original file line numberDiff line numberDiff line change
@@ -3459,6 +3459,21 @@ Type: Documentation-only
34593459
The [`dirent.path`][] is deprecated due to its lack of consistency across
34603460
release lines. Please use [`dirent.parentPath`][] instead.
34613461

3462+
### DEP0179: `Hash` constructor
3463+
3464+
<!-- YAML
3465+
changes:
3466+
- version: REPLACEME
3467+
pr-url: https://github.com/nodejs/node/pull/51077
3468+
description: Documentation-only deprecation.
3469+
-->
3470+
3471+
Type: Documentation-only
3472+
3473+
Calling `Hash` class directly with `Hash()` or `new Hash()` is
3474+
deprecated due to being internals, not intended for public use.
3475+
Please use the [`crypto.createHash()`][] method to create Hash instances.
3476+
34623477
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
34633478
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
34643479
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4
@@ -3497,6 +3512,7 @@ release lines. Please use [`dirent.parentPath`][] instead.
34973512
[`crypto.createCipheriv()`]: crypto.md#cryptocreatecipherivalgorithm-key-iv-options
34983513
[`crypto.createDecipher()`]: crypto.md#cryptocreatedecipheralgorithm-password-options
34993514
[`crypto.createDecipheriv()`]: crypto.md#cryptocreatedecipherivalgorithm-key-iv-options
3515+
[`crypto.createHash()`]: crypto.md#cryptocreatehashalgorithm-options
35003516
[`crypto.fips`]: crypto.md#cryptofips
35013517
[`crypto.pbkdf2()`]: crypto.md#cryptopbkdf2password-salt-iterations-keylen-digest-callback
35023518
[`crypto.randomBytes()`]: crypto.md#cryptorandombytessize-callback

0 commit comments

Comments
 (0)
Please sign in to comment.