diff options
author | Tobias Nießen <tniessen@tnie.de> | 2018-04-06 14:32:35 +0200 |
---|---|---|
committer | Tobias Nießen <tniessen@tnie.de> | 2018-04-09 16:32:12 +0200 |
commit | 99c77dc0185e0e83328d9074c30b7ef74f0b3dfd (patch) | |
tree | 28cfaa1928a51aec8e69adeae21f9b5a2dfbaea3 /doc | |
parent | dff214153f1b48615e3e4f134b252fbbe363c36f (diff) | |
download | android-node-v8-99c77dc0185e0e83328d9074c30b7ef74f0b3dfd.tar.gz android-node-v8-99c77dc0185e0e83328d9074c30b7ef74f0b3dfd.tar.bz2 android-node-v8-99c77dc0185e0e83328d9074c30b7ef74f0b3dfd.zip |
doc: improve CCM example
The nonce must be transmitted along with ciphertext and tag.
PR-URL: https://github.com/nodejs/node/pull/19851
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/crypto.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md index ed9711cd06..fbfcadedab 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -2267,7 +2267,7 @@ const ciphertext = cipher.update(plaintext, 'utf8'); cipher.final(); const tag = cipher.getAuthTag(); -// Now transmit { ciphertext, tag }. +// Now transmit { ciphertext, nonce, tag }. const decipher = crypto.createDecipheriv('aes-192-ccm', key, nonce, { authTagLength: 16 |