@@ -194,6 +194,8 @@ When using an authenticated encryption mode (only `GCM` is currently
194
194
supported), the ` cipher.setAAD() ` method sets the value used for the
195
195
_ additional authenticated data_ (AAD) input parameter.
196
196
197
+ The ` cipher.setAAD() ` method must be called before [ ` cipher.update() ` ] [ ] .
198
+
197
199
Returns ` this ` for method chaining.
198
200
199
201
### cipher.getAuthTag()
@@ -222,7 +224,8 @@ multiple of the cipher's block size or [`cipher.final()`][] will throw an Error.
222
224
Disabling automatic padding is useful for non-standard padding, for instance
223
225
using ` 0x0 ` instead of PKCS padding.
224
226
225
- The ` cipher.setAutoPadding() ` method must be called before [ ` cipher.final() ` ] [ ] .
227
+ The ` cipher.setAutoPadding() ` method must be called before
228
+ [ ` cipher.final() ` ] [ ] .
226
229
227
230
Returns ` this ` for method chaining.
228
231
@@ -333,6 +336,8 @@ When using an authenticated encryption mode (only `GCM` is currently
333
336
supported), the ` decipher.setAAD() ` method sets the value used for the
334
337
_ additional authenticated data_ (AAD) input parameter.
335
338
339
+ The ` decipher.setAAD() ` method must be called before [ ` decipher.update() ` ] [ ] .
340
+
336
341
Returns ` this ` for method chaining.
337
342
338
343
### decipher.setAuthTag(buffer)
@@ -346,6 +351,9 @@ received _authentication tag_. If no tag is provided, or if the cipher text
346
351
has been tampered with, [ ` decipher.final() ` ] [ ] with throw, indicating that the
347
352
cipher text should be discarded due to failed authentication.
348
353
354
+ The ` decipher.setAuthTag() ` method must be called before
355
+ [ ` decipher.final() ` ] [ ] .
356
+
349
357
Returns ` this ` for method chaining.
350
358
351
359
### decipher.setAutoPadding(auto_padding=true)
@@ -361,7 +369,7 @@ Turning auto padding off will only work if the input data's length is a
361
369
multiple of the ciphers block size.
362
370
363
371
The ` decipher.setAutoPadding() ` method must be called before
364
- [ ` decipher.update () ` ] [ ] .
372
+ [ ` decipher.final () ` ] [ ] .
365
373
366
374
Returns ` this ` for method chaining.
367
375
0 commit comments