@@ -194,6 +194,8 @@ When using an authenticated encryption mode (only `GCM` is currently
194194supported), the ` cipher.setAAD() ` method sets the value used for the
195195_ additional authenticated data_ (AAD) input parameter.
196196
197+ The ` cipher.setAAD() ` method must be called before [ ` cipher.update() ` ] [ ] .
198+
197199Returns ` this ` for method chaining.
198200
199201### cipher.getAuthTag()
@@ -222,7 +224,8 @@ multiple of the cipher's block size or [`cipher.final()`][] will throw an Error.
222224Disabling automatic padding is useful for non-standard padding, for instance
223225using ` 0x0 ` instead of PKCS padding.
224226
225- The ` cipher.setAutoPadding() ` method must be called before [ ` cipher.final() ` ] [ ] .
227+ The ` cipher.setAutoPadding() ` method must be called before
228+ [ ` cipher.final() ` ] [ ] .
226229
227230Returns ` this ` for method chaining.
228231
@@ -333,6 +336,8 @@ When using an authenticated encryption mode (only `GCM` is currently
333336supported), the ` decipher.setAAD() ` method sets the value used for the
334337_ additional authenticated data_ (AAD) input parameter.
335338
339+ The ` decipher.setAAD() ` method must be called before [ ` decipher.update() ` ] [ ] .
340+
336341Returns ` this ` for method chaining.
337342
338343### decipher.setAuthTag(buffer)
@@ -346,6 +351,9 @@ received _authentication tag_. If no tag is provided, or if the cipher text
346351has been tampered with, [ ` decipher.final() ` ] [ ] with throw, indicating that the
347352cipher text should be discarded due to failed authentication.
348353
354+ The ` decipher.setAuthTag() ` method must be called before
355+ [ ` decipher.final() ` ] [ ] .
356+
349357Returns ` this ` for method chaining.
350358
351359### decipher.setAutoPadding(auto_padding=true)
@@ -361,7 +369,7 @@ Turning auto padding off will only work if the input data's length is a
361369multiple of the ciphers block size.
362370
363371The ` decipher.setAutoPadding() ` method must be called before
364- [ ` decipher.update () ` ] [ ] .
372+ [ ` decipher.final () ` ] [ ] .
365373
366374Returns ` this ` for method chaining.
367375
0 commit comments