Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ is invalid according to [NIST SP 800-38D][] or does not match the value of the

The `decipher.setAuthTag()` method must be called before
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just modify this sentence instead to clarify, something like:

The `decipher.setAuthTag()` method must be called before
[`decipher.update()`][] for `CCM` mode or before [`decipher.final()`][] for
`GCM` and `OCB` modes. `decipher.setAuthTag()` can only be called once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! I just pushed a correction with this advice.

[`decipher.final()`][] and can only be called once.
When using `CCM` mode, the `decipher.setAuthTag()` method must be called before
[`decipher.update()`][].

### `decipher.setAutoPadding([autoPadding])`
<!-- YAML
Expand Down