From 08a7e7b009f041c008399749b33937aaf78ea1b4 Mon Sep 17 00:00:00 2001 From: Kirill Fomichev Date: Tue, 1 Nov 2016 15:24:31 +0300 Subject: [PATCH] crypto: return `this` in setAuthTag/setAAD Allow method chaining as with setAutoPadding and other methods. PR-URL: https://github.com/nodejs/node/pull/9398 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Sam Roberts Reviewed-By: Luigi Pinca Reviewed-By: Brian White Reviewed-By: James M Snell --- doc/api/crypto.md | 10 ++++++++++ lib/crypto.js | 2 ++ test/parallel/test-crypto-cipher-decipher.js | 11 +++++++++++ 3 files changed, 23 insertions(+) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index c3879f922c466c..62588bfa43c047 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -194,6 +194,8 @@ When using an authenticated encryption mode (only `GCM` is currently supported), the `cipher.setAAD()` method sets the value used for the _additional authenticated data_ (AAD) input parameter. +Returns `this` for method chaining. + ### cipher.getAuthTag()