crypto: return this in setAuthTag/setAAD by fanatid · Pull Request #9398 · nodejs/node

Expand Up @@ -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() <!-- YAML added: v1.0.0 Expand Down Expand Up @@ -222,6 +224,8 @@ using `0x0` instead of PKCS padding.
The `cipher.setAutoPadding()` method must be called before [`cipher.final()`][].
Returns `this` for method chaining.
### cipher.update(data[, input_encoding][, output_encoding]) <!-- YAML added: v0.1.94 Expand Down Expand Up @@ -329,6 +333,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.
### decipher.setAuthTag(buffer) <!-- YAML added: v1.0.0 Expand All @@ -340,6 +346,8 @@ received _authentication tag_. If no tag is provided, or if the cipher text has been tampered with, [`decipher.final()`][] with throw, indicating that the cipher text should be discarded due to failed authentication.
Returns `this` for method chaining.
### decipher.setAutoPadding(auto_padding=true) <!-- YAML added: v0.7.1 Expand All @@ -355,6 +363,8 @@ multiple of the ciphers block size. The `decipher.setAutoPadding()` method must be called before [`decipher.update()`][].
Returns `this` for method chaining.
### decipher.update(data[, input_encoding][, output_encoding]) <!-- YAML added: v0.1.94 Expand Down