Skip to content

Commit 99c77dc

Browse files
committed
doc: improve CCM example
The nonce must be transmitted along with ciphertext and tag. PR-URL: #19851 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent dff2141 commit 99c77dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/crypto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2267,7 +2267,7 @@ const ciphertext = cipher.update(plaintext, 'utf8');
22672267
cipher.final();
22682268
const tag = cipher.getAuthTag();
22692269

2270-
// Now transmit { ciphertext, tag }.
2270+
// Now transmit { ciphertext, nonce, tag }.
22712271

22722272
const decipher = crypto.createDecipheriv('aes-192-ccm', key, nonce, {
22732273
authTagLength: 16

0 commit comments

Comments
 (0)