Skip to content

Commit 20c553e

Browse files
Anshikakalpanaaduh95
authored andcommitted
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 83f0d37 commit 20c553e

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
@@ -4548,6 +4548,22 @@ that have proven unresolveable. See [caveats of asynchronous customization hooks
45484548
`module.registerHooks()` as soon as possible as `module.register()` will be
45494549
removed in a future version of Node.js.
45504550
4551+
### DEP0206: Calling `digest()` on an already-finalized `Hmac` instance
4552+
4553+
<!-- YAML
4554+
changes:
4555+
- version: REPLACEME
4556+
pr-url: https://github.com/nodejs/node/pull/63121
4557+
description: Documentation-only deprecation.
4558+
-->
4559+
4560+
Type: Documentation-only
4561+
4562+
Calling `hmac.digest()` more than once returns an empty buffer instead of
4563+
throwing an error. This behavior is inconsistent with `hash.digest()` and
4564+
may lead to subtle bugs. Calling `hmac.digest()` on a finalized `Hmac` instance
4565+
will throw an error in a future version.
4566+
45514567
[DEP0142]: #dep0142-repl_builtinlibs
45524568
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
45534569
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3

0 commit comments

Comments
 (0)