From 20d7d657bbc62cc7fd9b72828d5216ff531348d0 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 c6fb5733d9c846..1030c3fdd22bff 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])`