Skip to content

Commit 3838e04

Browse files
doc: deprecate hash constructor
1 parent 342ddb0 commit 3838e04

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
@@ -3545,6 +3545,21 @@ Type: Documentation-only
35453545
The [`dirent.path`][] is deprecated due to its lack of consistency across
35463546
release lines. Please use [`dirent.parentPath`][] instead.
35473547

3548+
### DEP0180: `Hash` constructor
3549+
3550+
<!-- YAML
3551+
changes:
3552+
- version: REPLACEME
3553+
pr-url: https://github.com/nodejs/node/pull/51077
3554+
description: Documentation-only deprecation.
3555+
-->
3556+
3557+
Type: Documentation-only
3558+
3559+
The `Hash()` function and `new Hash()` constructor are
3560+
deprecated due to being internals, not intended for public use.
3561+
Please use the [`crypto.createHash()`][] method to create Hash instances.
3562+
35483563
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
35493564
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
35503565
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4
@@ -3583,6 +3598,7 @@ release lines. Please use [`dirent.parentPath`][] instead.
35833598
[`crypto.createCipheriv()`]: crypto.md#cryptocreatecipherivalgorithm-key-iv-options
35843599
[`crypto.createDecipher()`]: crypto.md#cryptocreatedecipheralgorithm-password-options
35853600
[`crypto.createDecipheriv()`]: crypto.md#cryptocreatedecipherivalgorithm-key-iv-options
3601+
[`crypto.createHash()`]: crypto.md#cryptocreatehashalgorithm-options
35863602
[`crypto.fips`]: crypto.md#cryptofips
35873603
[`crypto.pbkdf2()`]: crypto.md#cryptopbkdf2password-salt-iterations-keylen-digest-callback
35883604
[`crypto.randomBytes()`]: crypto.md#cryptorandombytessize-callback

0 commit comments

Comments
 (0)