Skip to content

Commit 1b04f16

Browse files
doc: add Hmac.digest() documentation-only deprecation (DEP0206)
Signed-off-by: anshikakalpana <anshikajain196872@gmail.com> PR-URL: #63121 Refs: #62838 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3c2d2e3 commit 1b04f16

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

doc/api/deprecations.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4558,6 +4558,22 @@ that have proven unresolveable. See [caveats of asynchronous customization hooks
45584558
`module.registerHooks()` as soon as possible as `module.register()` will be
45594559
removed in a future version of Node.js.
45604560
4561+
### DEP0206: Calling `digest()` on an already-finalized `Hmac` instance
4562+
4563+
<!-- YAML
4564+
changes:
4565+
- version: REPLACEME
4566+
pr-url: https://github.com/nodejs/node/pull/63121
4567+
description: Documentation-only deprecation.
4568+
-->
4569+
4570+
Type: Documentation-only
4571+
4572+
Calling `hmac.digest()` more than once returns an empty buffer instead of
4573+
throwing an error. This behavior is inconsistent with `hash.digest()` and
4574+
may lead to subtle bugs. Calling `hmac.digest()` on a finalized `Hmac` instance
4575+
will throw an error in a future version.
4576+
45614577
[DEP0142]: #dep0142-repl_builtinlibs
45624578
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
45634579
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3

0 commit comments

Comments
 (0)