| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3598,12 +3598,15 @@ deprecated due to being internals, not intended for public use. | |||
| 3598 | 3598 | ||
| 3599 | 3599 | <!-- YAML | |
| 3600 | 3600 | changes: | |
| 3601 | + - version: REPLACEME | ||
| 3602 | + pr-url: https://github.com/nodejs/node/pull/52071 | ||
| 3603 | + description: Runtime deprecation. | ||
| 3601 | 3604 | - version: REPLACEME | |
| 3602 | 3605 | pr-url: https://github.com/nodejs/node/pull/51881 | |
| 3603 | 3606 | description: Documentation-only deprecation. | |
| 3604 | 3607 | --> | |
| 3605 | 3608 | ||
| 3606 | - Type: Documentation-only | ||
| 3609 | + Type: Runtime | ||
| 3607 | 3610 | ||
| 3608 | 3611 | Calling `Hmac` class directly with `Hmac()` or `new Hmac()` is | |
| 3609 | 3612 | deprecated due to being internals, not intended for public use. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -232,7 +232,7 @@ module.exports = { | |||
| 232 | 232 | DiffieHellmanGroup, | |
| 233 | 233 | ECDH, | |
| 234 | 234 | Hash: deprecate(Hash, 'crypto.Hash constructor is deprecated.', 'DEP0179'), | |
| 235 | - Hmac, | ||
| 235 | + Hmac: deprecate(Hmac, 'crypto.Hmac constructor is deprecated.', 'DEP0181'), | ||
| 236 | 236 | KeyObject, | |
| 237 | 237 | Sign, | |
| 238 | 238 | Verify, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -459,3 +459,13 @@ assert.strictEqual( | |||
| 459 | 459 | crypto.createHmac('sha256', keyObject).update('foo').digest(), | |
| 460 | 460 | ); | |
| 461 | 461 | } | |
| 462 | + | ||
| 463 | + { | ||
| 464 | + crypto.Hmac('sha256', 'Node'); | ||
| 465 | + common.expectWarning({ | ||
| 466 | + DeprecationWarning: [ | ||
| 467 | + ['crypto.Hmac constructor is deprecated.', | ||
| 468 | + 'DEP0181'], | ||
| 469 | + ] | ||
| 470 | + }); | ||
| 471 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments