Skip to content

Commit e325215

Browse files
doc: add documentation-only deprecation for multiple Hmac.digest() calls (DEP0206)
1 parent 1b0fdd6 commit e325215

3 files changed

Lines changed: 1 addition & 28 deletions

File tree

doc/api/deprecations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4564,7 +4564,7 @@ removed in a future version of Node.js.
45644564
changes:
45654565
- version: REPLACEME
45664566
pr-url: https://github.com/nodejs/node/pull/XXXXX
4567-
description: Runtime deprecation.
4567+
description: Documentation-only deprecation.
45684568
-->
45694569
45704570
Type: Runtime

lib/internal/crypto/hash.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,6 @@ const maybeEmitDeprecationWarning = getDeprecationWarningEmitter(
8787
},
8888
);
8989

90-
const emitHmacDoubleDigestDeprecation = getDeprecationWarningEmitter(
91-
'DEP0206',
92-
'Calling digest() on an already-finalized Hmac instance is deprecated.',
93-
undefined,
94-
false,
95-
);
96-
9790
function Hash(algorithm, options) {
9891
if (!new.target)
9992
return new Hash(algorithm, options);
@@ -190,7 +183,6 @@ Hmac.prototype.digest = function digest(outputEncoding) {
190183
const state = this[kState];
191184

192185
if (state[kFinalized]) {
193-
emitHmacDoubleDigestDeprecation();
194186
const buf = Buffer.from('');
195187
if (outputEncoding && outputEncoding !== 'buffer')
196188
return buf.toString(outputEncoding);

test/parallel/test-crypto-hmac-digest-deprecated.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)