diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 6bc66ab52a3a5f..66f8684eb1f5db 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -282,6 +282,19 @@ Once the `cipher.final()` method has been called, the `Cipher` object can no longer be used to encrypt data. Attempts to call `cipher.final()` more than once will result in an error being thrown. +### `cipher.getAuthTag()` + + +* Returns: {Buffer} When using an authenticated encryption mode (`GCM`, `CCM` + and `OCB` are currently supported), the `cipher.getAuthTag()` method returns a + [`Buffer`][] containing the _authentication tag_ that has been computed from + the given data. + +The `cipher.getAuthTag()` method should only be called after encryption has +been completed using the [`cipher.final()`][] method. + ### `cipher.setAAD(buffer[, options])` - -* Returns: {Buffer} When using an authenticated encryption mode (`GCM`, `CCM` - and `OCB` are currently supported), the `cipher.getAuthTag()` method returns a - [`Buffer`][] containing the _authentication tag_ that has been computed from - the given data. - -The `cipher.getAuthTag()` method should only be called after encryption has -been completed using the [`cipher.final()`][] method. - ### `cipher.setAutoPadding([autoPadding])`