@@ -245,7 +245,8 @@ once will result in an error being thrown.
245245added: v1.0.0
246246-->
247247- ` buffer ` {Buffer}
248- - ` options ` {Object}
248+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
249+ - ` plaintextLength ` {number}
249250- Returns: {Cipher} for method chaining.
250251
251252When using an authenticated encryption mode (only ` GCM ` and ` CCM ` are currently
@@ -398,7 +399,7 @@ Once the `decipher.final()` method has been called, the `Decipher` object can
398399no longer be used to decrypt data. Attempts to call ` decipher.final() ` more
399400than once will result in an error being thrown.
400401
401- ### decipher.setAAD(buffer)
402+ ### decipher.setAAD(buffer[ , options ] )
402403<!-- YAML
403404added: v1.0.0
404405changes:
@@ -407,12 +408,18 @@ changes:
407408 description: This method now returns a reference to `decipher`.
408409-->
409410- ` buffer ` {Buffer | TypedArray | DataView}
410- - Returns: {Cipher} for method chaining.
411+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
412+ - ` plaintextLength ` {number}
413+ - Returns: {Decipher} for method chaining.
411414
412415When using an authenticated encryption mode (only ` GCM ` and ` CCM ` are currently
413416supported), the ` decipher.setAAD() ` method sets the value used for the
414417_ additional authenticated data_ (AAD) input parameter.
415418
419+ The ` options ` argument is optional for ` GCM ` . When using ` CCM ` , the
420+ ` plaintextLength ` option must be specified and its value must match the length
421+ of the plaintext in bytes. See [ CCM mode] [ ] .
422+
416423The ` decipher.setAAD() ` method must be called before [ ` decipher.update() ` ] [ ] .
417424
418425### decipher.setAuthTag(buffer)
@@ -427,7 +434,7 @@ changes:
427434 description: This method now returns a reference to `decipher`.
428435-->
429436- ` buffer ` {Buffer | TypedArray | DataView}
430- - Returns: {Cipher } for method chaining.
437+ - Returns: {Decipher } for method chaining.
431438
432439When using an authenticated encryption mode (only ` GCM ` and ` CCM ` are currently
433440supported), the ` decipher.setAuthTag() ` method is used to pass in the
@@ -453,7 +460,7 @@ The `decipher.setAuthTag()` method must be called before
453460added: v0.7.1
454461-->
455462- ` autoPadding ` {boolean} ** Default:** ` true `
456- - Returns: {Cipher } for method chaining.
463+ - Returns: {Decipher } for method chaining.
457464
458465When data has been encrypted without standard block padding, calling
459466` decipher.setAutoPadding(false) ` will disable automatic padding to prevent
0 commit comments