From 3bb9d4e760bce7c29369c6a763871c8b2fdbda4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Wed, 11 Apr 2018 14:58:15 +0200 Subject: [PATCH] doc: mention CCM along with GCM in crypto APIs Refs: https://github.com/nodejs/node/pull/18138 --- doc/api/crypto.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index ea38da218a119f..ee63218410d5c7 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -263,10 +263,10 @@ The `cipher.setAAD()` method must be called before [`cipher.update()`][]. -- Returns: {Buffer} When using an authenticated encryption mode (only `GCM` is - currently supported), the `cipher.getAuthTag()` method returns a [`Buffer`][] - containing the _authentication tag_ that has been computed from the given - data. +- Returns: {Buffer} When using an authenticated encryption mode (only `GCM` and + `CCM` are currently supported), the `cipher.getAuthTag()` method returns a + [`Buffer`][] containing the _authentication tag_ that has been computed from + the given data. The `cipher.getAuthTag()` method should only be called after encryption has been completed using the [`cipher.final()`][] method. @@ -411,7 +411,7 @@ changes: - `buffer` {Buffer | TypedArray | DataView} - Returns: {Cipher} for method chaining. -When using an authenticated encryption mode (only `GCM` is currently +When using an authenticated encryption mode (only `GCM` and `CCM` are currently supported), the `decipher.setAAD()` method sets the value used for the _additional authenticated data_ (AAD) input parameter. @@ -428,7 +428,7 @@ changes: - `buffer` {Buffer | TypedArray | DataView} - Returns: {Cipher} for method chaining. -When using an authenticated encryption mode (only `GCM` is currently +When using an authenticated encryption mode (only `GCM` and `CCM` are currently supported), the `decipher.setAuthTag()` method is used to pass in the received _authentication tag_. If no tag is provided, or if the cipher text has been tampered with, [`decipher.final()`][] will throw, indicating that the