From 23d188fc1d87c33296c36445f2c0fc0dbf3f533e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Wed, 3 Nov 2021 17:14:55 +0100 Subject: [PATCH] doc: clarify getAuthTag with authTagLength Refs: https://github.com/nodejs/node/issues/40272 Refs: https://github.com/nodejs/node/pull/20235 PR-URL: https://github.com/nodejs/node/pull/40713 Reviewed-By: Rich Trott Reviewed-By: Filip Skokan Reviewed-By: Luigi Pinca --- doc/api/crypto.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 93d13e9850f857..eb0f416a4f8cb4 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -551,6 +551,9 @@ added: v1.0.0 The `cipher.getAuthTag()` method should only be called after encryption has been completed using the [`cipher.final()`][] method. +If the `authTagLength` option was set during the `cipher` instance's creation, +this function will return exactly `authTagLength` bytes. + ### `cipher.setAAD(buffer[, options])`