Skip to content

Commit

Permalink
crypto, doc: runtime deprecate Hash constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Feb 26, 2024
1 parent fc0f2cf commit 2a63dca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3562,13 +3562,17 @@ release lines. Please use [`dirent.parentPath`][] instead.
### DEP0179: `Hash` constructor

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/51880
description: Runtime deprecation.
changes:
- version: v21.5.0
pr-url: https://github.com/nodejs/node/pull/51077
description: Documentation-only deprecation.
-->

Type: Documentation-only
Type: Runtime

Calling `Hash` class directly with `Hash()` or `new Hash()` is
deprecated due to being internals, not intended for public use.
Expand Down
2 changes: 1 addition & 1 deletion lib/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ module.exports = {
DiffieHellman,
DiffieHellmanGroup,
ECDH,
Hash,
Hash: deprecate(Hash, 'crypto.Hash constructor is deprecated.', 'DEP0179'),
Hmac,
KeyObject,
Sign,
Expand Down

0 comments on commit 2a63dca

Please sign in to comment.