Unverified Commit 0c7cf244 authored by Jonathan Buhacoff's avatar Jonathan Buhacoff Committed by Shelley Vohr
Browse files

doc: correct description of `decipher.setAuthTag` in crypto.md

Calling `decipher.setAuthTag` after `decipher.update` will result in
an error like `Unsupported state or unable to authenticate data`.
The example code in
[CCM mode](https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_ccm_mode)
is correct, but to demonstrate the mistake in the documentation you
can take the same example and move the `setAuthTag` call to in between
`update` and `final` you will see the error.
parent 0177cbf9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment