Skip to content

Commit 6777eeb

Browse files
doc: add Hmac.digest() documentation-only deprecation (DEP0206)
1 parent 6e2188e commit 6777eeb

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)